select name,concat(reftype,'(',length,')'),nullable,ISNULL(descrip,'') descrip
from (
select distinct
A.COLUMN_ID as id,
A.column_name name,
A.data_type reftype,
A.data_length as length,
A.NULLABLE as nullable,
B.comments descrip
from
user_tab_columns A,
user_col_comments B
-- all_cons_columns C,
-- USER_TAB_COMMENTS D
where
a.COLUMN_NAME=b.column_name
and A.Table_Name = B.Table_Name
-- and A.Table_Name = D.Table_Name
-- and (A.TABLE_NAME=c.table_name)
and A.Table_Name='SELECTION_REASON' ORDER BY id
)
达梦数据库查询表结构相关信息sql
最新推荐文章于 2024-07-31 19:38:21 发布