小编Ron*_*dus的帖子

哪个Oracle视图包含所有约束?

我试图从user_objects表中获取CONSTRAINTS,如下所示:

 select CASE object_type
      WHEN 'DATABASE LINK' then 'dblinks'
      WHEN 'FUNCTION' then 'functions'
      WHEN 'INDEX' then 'indexes'
      WHEN 'PACKAGE' then 'packages'
      WHEN 'PROCEDURE' then 'procedures'
      WHEN 'SEQUENCE' then 'sequences'
      WHEN 'TABLE' then 'tables'
      WHEN 'TRIGGER' then 'triggers'
      WHEN 'VIEW' then 'views'
      WHEN 'SYNONYM' then 'synonyms'
      WHEN 'GRANT' then 'grants'
      WHEN 'CONSTRAINT' then 'constraints'
      ELSE object_type
      END||'|'||
      CASE object_type
      WHEN 'DATABASE LINK' then 'DB_LINK'
      ELSE object_type
      END||'|'||object_name
from user_objects
where object_name not like 'BIN$%'
and object_type not like '%PARTITION'
and object_type …
Run Code Online (Sandbox Code Playgroud)

oracle ddl constraints schemaexport dbms-metadata

2
推荐指数
1
解决办法
5235
查看次数

标签 统计

constraints ×1

dbms-metadata ×1

ddl ×1

oracle ×1

schemaexport ×1