运维联盟俱乐部

 找回密码
 立即注册
查看: 1647|回复: 0

[日常管理] q_dis_constriant

[复制链接]
  • TA的每日心情
    开心
    2023-8-9 11:05
  • 发表于 2020-9-11 15:02:53 | 显示全部楼层 |阅读模式
    1. clear columns breaks computes

    2. column owner           format a20 heading 'Owner'           print entmap off;
    3. column constraint_name format a30 heading 'Constraint Name' print entmap off;
    4. column constraint_type format a15 heading 'Constraint Type' print entmap off;
    5. column table_name      format a30 heading 'Table Name'      print entmap off;

    6. break on owner on table_name

    7. select owner,
    8.        table_name,
    9.        constraint_name,
    10.        decode(constraint_type,
    11.               'C',
    12.               'check constraint on a table',
    13.               'P',
    14.               'primary key',
    15.               'U',
    16.               'unique key',
    17.               'R',
    18.               'referential integrity',
    19.               'V',
    20.               'with check option, on a view',
    21.               'O',
    22.               'with read only, on a view',
    23.               null) constraint_type
    24.   from dba_constraints
    25. where status = 'DISABLED'
    26. order by 1, 2;
    复制代码



    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    运维联盟俱乐部 ( 冀ICP备19036648号 )

    GMT+8, 2024-5-17 10:13 , Processed in 0.047718 second(s), 21 queries , Gzip On.

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表