请问查找主键与外键的表是???? 请问查找主键与外键的表是???? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 要查找表名?这个可以 SELECT TABLE_NAME FROM USER_CONSTRAINTS where CONSTRAINT_NAME = ‘XXXX’; select a1.constraint_name NAME, Decode ( a1.CONSTRAINT_TYPE, 'C', 'Check', 'P', 'Primary Key', 'R', 'Referential Integrity', 'U', 'Unique Key', 'V', 'Check Option on a view') TYPE , a1.r_constraint_name RNAME, InitCap(a1.status) status, InitCap(a1.delete_rule) Delete_rule, c1.column_name, c1.position, R_CONSTRAINT_NAME, R_OWNER, a1.search_condition CONSTEXT, InitCap(A1.DEFERRABLE) deferrable, InitCap(A1.DEFERRED) deferred from DBA_CONS_COLUMNS C1, DBA_CONSTRAINTS A1 where C1.Table_name=A1.table_name And C1.Constraint_Name = A1.constraint_name And C1.owner = A1.owner and A1.table_name =:TabName and a1.owner=:Ownname order by 1,7 你可以根据user_constraints来查询 我从别人的机器上拷来ORACLE的数据文件可以使用么? 如何创建与视图同名的表? Oracle UDF的问题,恳请大侠指点!! 怎么写这条Sql? 100分!!紧急求助!!oracle的数据导入导出问题!整天在线QQ:39493690 请问如何设置才能使Oracle对数据对象的名字大小写敏感? 求和出错??!!在线等候!!! 如何在oracle中使用vc中定义的缓冲区? 如何使用archivelog模式下自動生成的文件對數據庫進行恢復﹖ ORACLE中怎样创建临时表? 修改某一字段值 急急急.....在线等待 pl/sql中连接字符串应该怎么写,在线等待!
SELECT TABLE_NAME FROM USER_CONSTRAINTS where CONSTRAINT_NAME = ‘XXXX’;
Decode ( a1.CONSTRAINT_TYPE, 'C', 'Check', 'P', 'Primary Key', 'R', 'Referential Integrity',
'U', 'Unique Key', 'V', 'Check Option on a view') TYPE
, a1.r_constraint_name RNAME,
InitCap(a1.status) status, InitCap(a1.delete_rule) Delete_rule,
c1.column_name, c1.position, R_CONSTRAINT_NAME, R_OWNER
, a1.search_condition CONSTEXT
, InitCap(A1.DEFERRABLE) deferrable, InitCap(A1.DEFERRED) deferred
from
DBA_CONS_COLUMNS C1, DBA_CONSTRAINTS A1
where C1.Table_name=A1.table_name
And C1.Constraint_Name = A1.constraint_name
And C1.owner = A1.owner
and A1.table_name =:TabName
and a1.owner=:Ownname
order by 1,7