Difference between a check constraint and a trigger
714767Sep 25 2009 — edited Sep 25 2009Hi, 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