Hi
How can we define Trigger in SqlServer and define Syntax?
Trigger in SqlServer
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Javeed M ShaikhRank #839 · 2.7K reputationPosted Nov 9, 2011, 2:39 PM EST
Following is an example of INSERT Trigger in SQL Server:
CREATE TRIGGER myTrigger
ON myTable
FOR INSERT
AS
// your code comes here
Prabhu RajaRank #861 · 2.6K reputationPosted Nov 9, 2011, 7:07 PM EST
The Basic Syntax of trigger is,
CREATE TRIGGER trigger_name
ON {table_name|view_name}[WITH ENCRYPTION]
{FOR|AFTER|INSTEAD OF} [INSERT] [,] [UPDATE] [,] [DELETE]
As
sql_statements
Check out this Article : http://www.c-sharpcorner.com/uploadfile/shashikantray/create-delete-and-update-triggers-in-a-database/
Priya LingeRank #785 · 2.9K reputationPosted Nov 9, 2011, 7:29 PM EST
Please check below link which will help to understand the Trigger in SqlServer.
http://www.sqlteam.com/article/an-introduction-to-triggers-part-i
http://en.wikipedia.org/wiki/Database_trigger
Hope this will help you.
Thanks.