在search_condition的值之后查询Oracle约束

Bli*_*1eg 5 sql oracle constraints

我想在Oracle SQL中找到具有特定search_condition的约束.像这样的东西:

SELECT constraint_name, constraint_type,search_condition
FROM USER_CONSTRAINTS
WHERE table_name ='MYTABLE' AND search_condition = '"myColumn" IS NOT NULL';
Run Code Online (Sandbox Code Playgroud)

问题是我得到错误"非法使用数据类型LONG".

我很欣赏一个可行的替代品.谢谢!

Gre*_*lds 0

显然你需要使用 PL/SQL。请参阅此处的示例:

http://www.orafaq.com/forum/m/110779/43055/?srch=instr+long#msg_110779

本质上,您不能在 where 子句中使用 LONG。

  • 该 URL 不再有效。 (4认同)