postgresql DBeaver,从数据库 Postgres 导出,表结构(属性)到文件 .txt
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/51552470/
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
DBeaver, export from database Postgres, table structure (properties) into file .txt
提问by Iani M.D.
I have little problem with DBeaver. I want to export my structure from each table from database in file .txt. I found how to export all data but I don't need this data, just table structure. If you have some solutions for export table structure .csv it'll be good.
我对 DBeaver 没什么问题。我想从文件 .txt 中的数据库中的每个表中导出我的结构。我找到了如何导出所有数据,但我不需要这些数据,只需要表结构。如果您有一些导出表结构 .csv 的解决方案,那就太好了。
Here is a an image about structure of the table:
这是有关表结构的图像:
回答by Cloudranger
If you are happy to have the table structures as SQL CREATE statements, then you can just go to the navigator panel on the left, into "Tables", select all the tables, then right click and Choose "Generate SQL" -> DDL
如果您很高兴将表结构作为 SQL CREATE 语句,那么您可以转到左侧的导航器面板,进入“表”,选择所有表,然后右键单击并选择“生成 SQL”-> DDL
回答by Thang Luu Quoc
Click on Tables -> Views Tables -> Select All tables in right window Right click selection -> Generate SQL" -> DDL
单击表 -> 视图表 -> 选择右侧窗口中的所有表 右键单击选择 -> 生成 SQL” -> DDL
回答by Veera
I tried like this:
我试过这样:
- Doubleclick the table columns
- Select all the columns
- Choose right click the mouse and select copy advanced info
- Open an Excel -> paste special -> choose text option
- All your table data structure will be in the Excel sheet
- 双击表格列
- 选择所有列
- 选择右键单击鼠标并选择复制高级信息
- 打开 Excel -> 选择性粘贴 -> 选择文本选项
- 您所有的表格数据结构都将在 Excel 工作表中