Generate table DDL via query on MySQL and SQL Server July 24, 2023 by Tarik it’s mysql-specific, but SHOW CREATE TABLE <table-name> gives you the DDL for a table.