国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > 綜合 > 正文

找出哪些table沒有primary key

2024-07-21 02:33:57
字體:
供稿:網(wǎng)友

  可以依照SCHEMA展出沒有設(shè)PK的TABLE
  
  def schema_name = &&owner_name
  
  col sname format a30 heading 'Schema'
  col tname format a30 heading 'Table Name'
  
  select
  dt.owner sname,
  dt.table_name tname
  from
  sys.dba_tables dt
  where
  dt.owner like upper('&schema_name') escape '/'
  and
  not exists
  (select 'x' from sys.dba_constraints dc
  where dc.owner = dt.owner
  and dc.table_name = dt.table_name
  and dc.constraint_type = 'P')
  order by 1,2
  /
  
  執(zhí)行結(jié)果
  
  Schema Table Name
  ------------------------------ ------------------------------
  APPLE TEST_TB
  APPLE KKK
  APPLE P1
  APPLE PLAN_TABLE
  APPLE QQ
  APPLE T1
  APPLE T2
  APPLE T3

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 和硕县| 黔东| 安化县| 额济纳旗| 和林格尔县| 房产| 阜城县| 从江县| 惠东县| 曲麻莱县| 清水河县| 五大连池市| 林芝县| 荆州市| 青州市| 门头沟区| 大理市| 类乌齐县| 红原县| 库尔勒市| 股票| 牙克石市| 万年县| 横峰县| 尚义县| 阿荣旗| 连南| 静安区| 台南县| 中宁县| 土默特左旗| 大方县| 新泰市| 鸡泽县| 玉林市| 遵义县| 康保县| 苗栗市| 铜山县| 吉木乃县| 松潘县|