1.Oracle查询数据库表结构
select
ut.COLUMN_NAME,--字段名称
uc.comments,--字段注释
ut.DATA_TYPE,--字典类型
ut.DATA_LENGTH,--字典长度
ut.NULLABLE--是否为空
from user_tab_columns ut
inner JOIN user_col_comments uc
on ut.TABLE_NAME = uc.TABLE_NAME and ut.COLUMN_NAME = uc.COLUMN_NAME
where ut.Table_Name='表名称'
order by ut.COLUMN_NAME
2.Mysql查询数据库表结构
show create table 表名称;