How I can create Triggers?
What is a Trigger in SQL Server? And how I can create a trigger?
Please help me out.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Bechir BejaouiPosted Oct 26, 2008, 5:19 PM
for example you can create a trigger to do not accept any phone format in the phone colmun but xxx-xxxx-xx-xxxx for example when the user inserts a different format the trigger prevent from saving that to the data base
example:
CREATE TRIGGER name ON table
FOR INSERT
AS
--put instructions here
GO
this is a good article about this