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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM