3个回答
展开全部
取ORACLE某个表的所有列:
select column_name,data_type from all_tab_columns
where table_name=TABLENAME and owner=USER
select column_name,data_type from all_tab_columns
where table_name=TABLENAME and owner=USER
追问
谢谢啊,这个我也知道,有没有查索引和约束的语句呢?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
约束:
select constraint_name, constraint_type,search_condition, r_constraint_name
from user_constraints where table_name = upper('&table_name');
视图
user_views这个不好用
select * from DBA_DEPENDENCIES where type='VIEW' and referenced_owner = 'USERNAME' and referenced_name = 'TABLENAME'
索引:
select * from user_indexes where table_name = 'XXX'
select constraint_name, constraint_type,search_condition, r_constraint_name
from user_constraints where table_name = upper('&table_name');
视图
user_views这个不好用
select * from DBA_DEPENDENCIES where type='VIEW' and referenced_owner = 'USERNAME' and referenced_name = 'TABLENAME'
索引:
select * from user_indexes where table_name = 'XXX'
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询