Dameng database export data table structure as excel or html or text (for writing documents)

The data table structure exported by Dameng database is excel or html or text (for writing documents).
The domestic Dameng database is used in the project. After the first phase of the project, the database design document should be required. One of them needs a table structure (fields, field precision, description...)
because it is a domestic database, so its tools cannot be shared with mysql, oracle, and sqlServer. You can only use its own tools for data migration. A series of operations such as table migration, data import and export, etc.
After consulting documents and materials, I finally found a way.
The sql is as follows:

select 
	utc.column_name 字段名,
	utc.data_type 字段类型,
	utc.data_length 数据长度,
	utc.data_precision 数据精度,
	utc.nullable 是否为空 ,
	ucc.comments 备注
from user_tab_columns utc,user_col_comments ucc
where utc.column_name = ucc.column_name and utc.Table_Name = ucc.Table_Name 
and utc.Table_Name = '表名' and owner='模式名'

1: Step
insert image description here
2: Step
insert image description here

Just click OK at the end. The exported content is the same as the database result set.
Study notes, for reference only! If there is a better way, guidance is welcome.

Guess you like

Origin blog.csdn.net/weixin_51114236/article/details/126525452