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!

Using a function in a check constraint

6816May 18 2004 — edited May 20 2004
Hi,

I created a domain table(id, code, domain_code, description) and foreign keys to this table. To ensure that a valid domain is put in the column I created a function that returns a boolean and has two parameters (id and domain_code). It returns true if the id and domain belong together.
I want to know if it is possible to create a check constraint which validates the data in the refering table with the data in the domain table.

Does anyone know if this is possible? Or do I have to use a db-trigger?

Regards,
Romano
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2004
Added on May 18 2004
13 comments
4,304 views