Ahmed Nabil
Ahmed Nabil

Reputation: 18986

How do I generate a SQL script(s) [file separated] from my diagram in MySQL Workbench?

When investigation
I found following answer
How do I generate a SQL script from my diagram in MySQL Workbench?

BUT its generate ALL database tables code into ONLY ONE single SQL script

Any Help to generate the database tables code into Multi Separated SQL script(s)

Upvotes: 0

Views: 187

Answers (2)

Ahmed Nabil
Ahmed Nabil

Reputation: 18986

Open (Data Export) by selecting following menu item
Server -> Data Export

Then

  1. Choose your DB schema and its tables which need to be exported
  2. Choose Dump Structure Only
  3. Choose Export option Export to Dump project folder
  4. Finally after customize your export .. click start export

Upvotes: 0

Mike Lischke
Mike Lischke

Reputation: 53317

There is no direct way to exclude or include a specific database in the output script, however you can use a workaround. On the SQL Object Export Filter page you can determine which objects to export. Since it supports multiselection and is sorted alphabetically (so all objects from one schema stay together) you can quickly collect object lists for each schema.

enter image description here

enter image description here

Upvotes: 1

Related Questions