ITPub博客

首页 > 数据库 > Oracle > oracle查询没有主键的表

oracle查询没有主键的表

原创 Oracle 作者:甲骨文技术支持 时间:2017-01-09 21:17:58 0 删除 编辑

用到了exists,经典的功能性SQL

点击(此处)折叠或打开

  1. select table_name
  2.   from user_tables a
  3.  where not exists (select *
  4.           from user_constraints b
  5.          where b.constraint_type = 'P'
  6.            and a.table_name = b.table_name)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/20893244/viewspace-2132149/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
2009年获得Oracle OCM认证,ITPUB社区OCM联盟成员,熟悉Oracle,mysql,Python,Zabbix等。

注册时间:2016-12-31

  • 博文量
    143
  • 访问量
    570501