如何查看Oracle上的检查约束的内容 [英] How to see contents of Check Constraint on Oracle

查看:1237
本文介绍了如何查看Oracle上的检查约束的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有创建我正在使用的数据库,但我想查看一个检查约束的详细信息。

I did not create the database I'm working with, but I would like to see the details of a check constraint.

我知道一个检查约束列正在强制一组特定的值,我想知道这些值是什么。例如,如果一个检查约束强制执行字符'Y'和'N',我想能够查询数据库,看到接受的值是'Y'和'N'。

I know a check constraint on a column is enforcing a set of specific values, and I'd like to know what those values are. For example, if a check constraint is enforcing the character 'Y' and 'N', I want to be able to query the database and see that the accepted values are 'Y' and 'N.'

这可能通过查询吗?

推荐答案

select constraint_name,search_condition 
from all_constraints
where table_name='NAME_OF_YOUR_TABLE'
and constraint_type='C';

将列出特定表上所有检查约束的检查和约束名称。

Will list the check and the constraint name of all check constraints on a specific table.

这篇关于如何查看Oracle上的检查约束的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆