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!

Difference between a check constraint and a trigger

714767Sep 25 2009 — edited Sep 25 2009
Hi, I wanted to know the exact usage of a trigger within a database.
Suppose I want to have a restriction on an insert into a Employees table that provides a check on the time that a particular employee signs in,
I could do that with the help of a before insert trigger that prevents certain values fgrom being inserted.
But cant I do the same thing with the help of a simple check constraint?
Where exactly does the distincton lie between a constraint and a trigger?

Edited by: user8680847 on Sep 24, 2009 11:55 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2009
Added on Sep 25 2009
4 comments
1,242 views