oracle查询没有主键的表

select table_name
  from user_tables a
 where not exists (select *
          from user_constraints b
         where b.constraint_type = 'P'
           and a.table_name = b.table_name)

转载:http://blog.itpub.net/20893244/viewspace-2132149/

猜你喜欢

转载自www.cnblogs.com/sweet22353/p/9839399.html