MySQL 使用mysqlworkbench仅导出表结构
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22317204/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Exporting only table structure using mysqlworkbench
提问by user3275044
Can anybody tell whether it possible for exporting only the table structure using MySQL workbench
任何人都可以告诉是否可以使用 MySQL 工作台仅导出表结构
回答by Christian Mark
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:
- Database > Reverse Engineer (Ctrl+R)
- Go through the steps to create the EER Diagram
- When viewing the EER Diagram click File > Forward Engineering SQL_CREATE Script... (Ctrl+Shift+G)
Forward Engineering SQL_CREATE Script.. 选项并获取整个数据库的创建脚本:
- 数据库 > 逆向工程师 (Ctrl+R)
- 完成创建 EER 图的步骤
- 查看 EER 图表时,单击文件 > 正向工程 SQL_CREATE 脚本... (Ctrl+Shift+G)
回答by cyber8200
回答by MeenakshiSingh
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.
也可以立即执行此操作。在导航器中选择“数据导出”,然后选择架构和所需的表。然后选中“跳过表数据(无数据)”复选框,然后单击“开始导出”按钮。
回答by chandrashekar.n
In MySQL workbench ,when we are exporting data you have a 3 options Dump Data only,"Dump Structure only", Dump Data Structure only.
在 MySQL 工作台中,当我们导出数据时,您有 3 个选项仅转储数据,“仅转储结构”,仅转储数据结构。
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
- 导出到自包含文件 - 要导出的 SQL 的位置 *单击开始导出
$ when we are import this .SQL file , we will get schema without data only tables
$ 当我们导入这个 .SQL 文件时,我们将得到没有数据表的模式
回答by David Lopez
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
在Workbench
版本6.3
是Menu Server->Data Export
,然后"Dump structure only"
在窗口右侧的选择列表中选择
回答by Misho
1) Right click the table and select "Table Inspector"
2) Last tab "DDL" has the table scheme
1) 右键单击表格并选择“表格检查器”
2) 最后一个选项卡“DDL”具有表格方案