Blog

How to get the structure of a table as a create statement in mysql

Posted by : Leo T Abraham on 1 April, 2014

We can obtain the structure of a table as a create statement using mysql.

For that we can use the following SQL query

SHOW CREATE TABLE table

In which the section table has to be replaced with the table name.

By this method we can obtain the create query for a particular table.

user image
bibisha
Thanks :-) It worked like a charm