Oracle 查询字段在什么表
生活随笔
收集整理的這篇文章主要介紹了
Oracle 查询字段在什么表
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
Oracle 查詢字段在什么表
?
?-- 查詢字段在什么表
select * from all_tab_cols t where t.column_name='ABC';?
-- 查詢字段在什么表并且 判斷是否是主鍵
select * from all_tab_cols t left join (select a.table_name, a.constraint_name, a.column_name, b.constraint_type -- 字段約束類型(P:主鍵) from user_cons_columns ainner join user_constraints b on a.constraint_name = b.constraint_name -- and b.constraint_type = 'P' ) tcon 1=1 and t.table_name = tc.table_nameand t.column_name = tc.column_namewhere 1=1and t.column_name = 'PK_PSNDOC' -- 要查詢的字段and tc.constraint_type = 'P' -- 判斷是否為主鍵ORDER BY t.table_name?
posted on 2014-08-29 16:42?Alfa 閱讀(...) 評(píng)論(...) 編輯 收藏轉(zhuǎn)載于:https://www.cnblogs.com/wuyifu/p/3945295.html
總結(jié)
以上是生活随笔為你收集整理的Oracle 查询字段在什么表的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: MessageDigest简单介绍
- 下一篇: 计算机网络之物理层:3、奈式准则和香农公