Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpMyAdmin and SHOW CREATE TABLE

Is there a shortcut in phpMyAdmin to SHOW CREATE TABLE for a table (i.e. a button I can click to get the full query, not the truncated one)?

Also, can I query multiple SHOW CREATE TABLEs simultaneously in phpMyAdmin? If I separate them, only the last one appears.

like image 557
waiwai933 Avatar asked Jun 22 '10 04:06

waiwai933


People also ask

How do I display tables in phpMyAdmin?

Choose the Database User and click phpMyAdmin. On the left pane of your phpMyAdmin page, click on the Database User. Click on the table to display the Structure page for the table.

How can I tell when a table was created in phpMyAdmin?

SELECT create_time FROM INFORMATION_SCHEMA. TABLES WHERE table_schema = 'yourDatabaseName' AND table_name = 'yourTableName'; My table name is 'skiplasttenrecords' and database is 'test'.

How do you get the create script of a table in MySQL?

In MySQL workbench, you get the already created table script, by just right click on the specific table, then select send to SQL editor>>create statement . That's all you will get the create table script on the editor.


3 Answers

If you are trying to export the Table Schema Using the SHOW CREATE TABLE Query Inside phpmyadmin, and are getting some truncated SQL then please follow the following steps to output the complete SQL Query to replicate the table structure.

  • There is this Hyperlink named +Options right above the truncated SQL that you are getting, Clicking on which shall make make a few toggles/options appear.
  • There select Full Texts, And right below this toggle there is this Go button, maybe on the extreme right.
  • And You should get the Full Text of the SQL.
like image 189
Mohd Abdul Mujib Avatar answered Oct 15 '22 01:10

Mohd Abdul Mujib


It sounds like what you want is all/part of the result of the 'export' tab.

If you tell it to export in sql, it gives you the table creation and popluation code (for all tables in the database)

like image 33
zebediah49 Avatar answered Oct 14 '22 23:10

zebediah49


Click the database > Select the tables you want > Choose With selected: Show create > done

Screenshots:

Click the database

Select the tables you want > Choose With selected: Show create

done

like image 35
MuhsinFatih Avatar answered Oct 15 '22 01:10

MuhsinFatih