Rather than getting table structure (DESC tablename;) Is there any possibility to get table syntax (query) in mysql ?
2 Answers
Try this
SHOW CREATE TABLE tablename
You may check out SHOW CREATE TABLE Syntax
Shows the CREATE TABLE statement that creates the named table. To use this statement, you must have some privilege for the table. As of MySQL 5.0.1, this statement also works with views.