Oracle 查询表名字段名

 

SELECT t.table_name as "name", c.comments as "alias" FROM USER_TABLES t left join  user_tab_comments c on t.TABLE_NAME = c.table_name

 

 

select c.column_name as "name" ,cc.comments as "alias" from user_tab_columns   c left join user_col_comments cc on cc.table_name = c.TABLE_NAME and cc.column_name=c.COLUMN_NAME
where c.table_name = 'DATAITEM'

 

posted @ 2020-03-25 11:58  leechg  阅读(1515)  评论(0编辑  收藏  举报