Oracle常用查询(一)
select t.* from product_component_version t; --查看 oracle 产品组件版本
select t.* from user_db_links t; --dblink
select t.* from user_synonyms t; --同义词
select t.* from user_jobs t; --dbms_job
--查询外键 select a.constraint_name 外键约束名, b.table_name 外键所在表, b.column_name 外键所在列, a.r_constraint_name 关联主键名, c.table_name 关联表, c.column_name 关联表列名, a.status, a.validated from user_constraints a, user_cons_columns b, user_cons_columns c where 1 = 1 and a.constraint_type = upper('r') and a.constraint_name = b.constraint_name and a.r_constraint_name = c.constraint_name and exists (select 1 from user_tables ut where ut.table_name = a.table_name and ut.num_rows > 0) and 1 = 1 ---and b.table_name=upper('t_user')---表有哪些外键 and c.table_name = upper('t_user') ---表被哪些外键引用 order by a.table_name, a.constraint_type;