views:

88

answers:

1

Hey,

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

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.'

Is this possible to do through a query?

+4  A: 
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.

DBA
Thanks for the quick reply!
Chris