Saturday, 7 September 2013

BEFORE INSERT TRIGGER SQL SERVER ON TABLE

BEFORE INSERT TRIGGER SQL SERVER ON TABLE

I have to create a BEFORE INSERT trigger on SALARY table, so that it
prevents insertion of a new salary record if the year, the movie is made
is before the birth year of coresponding movie star. I want to print a
error message if the INSERT is rejected.
Salary includes: starname, movietitle, movieyear, amount moviestar
includes: name, address, city, gender, birth year
In the trigger i need to add if movie year is < birth year print error
message and reject insert.
thanks,

No comments:

Post a Comment