user3275044
user3275044

Reputation: 433

Exporting only table structure using mysqlworkbench

Can anybody tell whether it possible for exporting only the table structure using MySQL workbench

Upvotes: 41

Views: 58637

Answers (7)

PQ RS
PQ RS

Reputation: 89

Step 1: Open MySql Workbench

Step 2: Go to Server >> Data Export

Step 3: Select Your table or database and select one of option from

    1. Dump Structure and data (default selected option) , or 

    2. Dump data only , or

    3. Dump Structure only 

Step 4: Click on 'Start Export'

    NOTE:if system is Ubuntu Linux then you will your exported files at here 'HOME/dumps'

Upvotes: 1

Misho
Misho

Reputation: 3021

1) Right click the table and select "Table Inspector"
2) Last tab "DDL" has the table scheme

Upvotes: 2

code-8
code-8

Reputation: 58632

For those of you that like the visual answer :

enter image description here

enter image description here

Start export - done :)

Upvotes: 37

David López
David López

Reputation: 403

In Workbench version 6.3 is Menu Server->Data Export and then select "Dump structure only" in the selection list at the right of the window

Upvotes: 3

chandrashekar.n
chandrashekar.n

Reputation: 374

In MySQL workbench ,when we are exporting data you have a 3 options Dump Data only,"Dump Structure only", Dump Data Structure only.

Server -> Data Export -> select the schema , Dump Structure only (beside refresh)

  • export to self- contained file - location of SQL to export *click on start Export

$ when we are import this .SQL file , we will get schema without data only tables

Upvotes: 3

msingh
msingh

Reputation: 549

It's possible to do this at once too. Select "Data Export" in the navigator and then select the schema and the required tables. Then check the checkbox saying "Skip table data(no data)" and then click on "Start Export" button.

Upvotes: 8

Mark
Mark

Reputation: 8431

To get an individual table's creation script:

  • just right click on the table name and click Copy to Clipboard > Create Statement.

To enable the File:

  • Forward Engineering SQL_CREATE Script.. option and to get the creation script for your entire database:

    1. Database > Reverse Engineer (Ctrl+R)
    2. Go through the steps to create the EER Diagram
    3. When viewing the EER Diagram click File > Forward Engineering SQL_CREATE Script... (Ctrl+Shift+G)

Upvotes: 48

Related Questions