How to get a table creation script in MySQL Workbench?

后端 未结 13 1662
醉梦人生
醉梦人生 2020-12-07 12:17

I am rolling back to MySQL GUI Tools\' MySQL Query Browser since I can\'t find the shortcut to get a table\'s creation script in MySQL Workbench.

13条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 12:36

    Not sure if this is still an issue, but for me in 5.2.35CE it's possible to get the create scripts by:

    1. Database --> Reverse Engineer

    2. Under stored connection, choose your database

    3. Hit "Next" a few times, choose which schema you want to reverse engineer, and let the tool work

    4. You'll get an "EER Diagram" view with all the DB's schema. If you right click on the table you care about and choose "Copy SQL to Clipboard" I think you'll have what you need.

    Hopefully this helps someone else that needs it.

提交回复
热议问题