oracle取出所有表和视图
select c.TABLE_NAME,
d.COMMENTS,
d.table_type,
(select wmsys.wm_concat(a.column_name)
from user_cons_columns a, user_constraints b
where a.constraint_name = b.constraint_name
and b.constraint_type = 'P'
and a.table_name = c.TABLE_NAME) as prim
from user_tables c, user_tab_comments d
where c.TABLE_NAME = d.TABLE_NAME
union all
select s.table_name,s.comments,s.table_type,s.comments as prim
还有
select s.table_name,s.comments,s.table_type,s.comments as prim from user_views t ,user_tab_comments s where t.view_name=s.table_name;
SELECT * FROM user_tab_cols WHERE table_name ='BI_CYCSLX';
select * from user_tab_comments
梅花香自古寒来