Select a.Owner 主鍵擁有者, a.table_name 主鍵表, b.Column_Name 主鍵列, b.Constraint_Name 主鍵名 From user_Constraints a, user_Cons_Columns b Where a.Constraint_Type = 'P' --P-主鍵;R-外鍵;U-惟一約束 and a.Constraint_Name = b.Constraint_Name And a.Owner = b.Owner And a.table_name = b.table_name and a.owner=upper('ETL') And a.table_name=upper('TFUNDINFO');