Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Check Constraint - Alternative to subqueries?

604609Oct 22 2007 — edited Oct 29 2007
Hello Oracle community,

Since Oracle does not allow the use of subqueries in check constraints statements what is the alternative that would still use a check clause? (I'm using Oracle 10g)

"Ex: alter table table1 add constraint constraint1
check ((SQL_Query1) > 0);

where SQL_Query is a select query statement. Error message is "SQL Error: ORA-02251: subquery not allowed here...".

Thank you!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 20 2007
Added on Oct 22 2007
6 comments
4,343 views