How to Show CREATE TABLE in MySQL

Last updated July 25, 2026 · By the SaturnSQL team

SHOW CREATE TABLE prints the complete CREATE TABLE statement, including columns, indexes, foreign keys, charset, and engine. It is the quickest way to export a table's DDL or recreate it in another database.

SHOW CREATE TABLE orders;

Also works for databases and views

SHOW CREATE DATABASE shop;
SHOW CREATE VIEW active_customers;

To export DDL for every table at once, run mysqldump --no-data shop > schema.sql from the shell.

Run this in SaturnSQL

SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.

Try it free

Related MySQL guides

© 2026 Panda Capital Oy Ab. All rights reserved.