MySQL Command to display the Table Structure/Definition
Question by Guest | 2013-10-03 at 21:16
Is there a command in MySQL that allows me to get the entire structure of a table with all names and column definitions?
I have several MySQL tables to copy to another computer and it's totally awkward to specify the new construction with all the names, file types and default values each time again.
Related Topics
MySQL: Delete Data from Table - Difference between TRUNCATE, DELETE and DROP
Tutorial | 0 Comments
MySQL: 3 Ways of showing Table Definition and Structure
Info | 0 Comments
MySQL: Add new Column to a Table
Tutorial | 0 Comments
SQLite: Check whether Table exists
Info | 0 Comments
MySQL: CSV Export as File stored on the Server
Tutorial | 0 Comments
SQLite: Creating an Index on one or more Columns
Info | 0 Comments
MySQL: Write current Date or Time into Column
Tutorial | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
Yes, there is a command. Just use "SHOW CREATE TABLE" for this. Here is a small example of how to show the structure of the table "tab":
The result may look like this:
It contains the CREATE TABLE statement to rebuild the structure of the table.
2013-10-04 at 20:22