faqts : Computers : Databases : MySQL : Shell Commands : mysqldump

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

22 of 29 people (76%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How can I copy a table or table structure?
Can I use mysqldump to print out table definitions?

Jan 23rd, 2000 22:10
Nathan Wallace, James Treworgy, Sinisa Milivojevic


The shell command:

    mysqldump -d -p -u root db_name

will dump out the table definitions/create statements.  More information
is available here:

    http://www.mysql.com/Manual_chapter/manual_Tools.html#mysqldump

You could also try one of these SQL commands:

    CREATE from SELECT is available since 3.23.0.

    INSERT from SELECT is available since 3.22.0.

    SELECT INTO OUTFILE is available since 3.21.xx.