Pages

Ads 468x60px

Trigger to print the message on value insertion. //give error

create trigger Messageon_Insert on student

after insert

as

if(select count(*) from student where ID= inserted.ID)!=@@rowcount

begin

Print 'Student Detail Inserted successfully'

end

else

Print 'Sorrry, Student Detail not Inserted successfully'

No comments:

Post a Comment