when will you use triggers? and where we use triggers? [Resolved]

Posted by Chamu under Sql Server on 11/27/2015 | Points: 10 | Views : 545 | Status : [Member] | Replies : 4
When will you use triggers ? Where we use triggers?




Responses

Posted by: Rajayadav on: 11/27/2015 [Member] Starter | Points: 50

Up
0
Down

Resolved
Hi, A Trigger is a Database object just like a stored procedure or we can say it is a special kind of Stored Procedure which fires when an event occurs in a database.

Real time example trigger.

You have account in Bank.So your bank /personal details are is saved in Bank. If you want money withdraw money in ATM. Once get cash then get the message from bank for your mobile. How it is working? If u know tigger also know?

If you changed your account details at the tigger is fired so that you will get the message from bank.

More details check out below links

http://www.c-sharpcorner.com/UploadFile/63f5c2/triggers-in-sql-server/

http://www.codeproject.com/Articles/38808/Overview-of-SQL-Server-database-Triggers

http://www.c-sharpcorner.com/Blogs/5315/trigger-in-sql-server.aspx

Thanks
-Raja

Chamu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Chamu on: 11/27/2015 [Member] Starter | Points: 25

Up
0
Down
Thanks

Chamu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajnilari2015 on: 11/27/2015 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

Up
0
Down
Also you can refer http://www.dotnet-tricks.com/Tutorial/sqlserver/OJ97170312-Different-Types-of-SQL-Server-Triggers.html

--
Thanks & Regards,
RNA Team

Chamu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajayadav on: 11/30/2015 [Member] Starter | Points: 25

Up
0
Down
you are most Welcome @Chamu

Thanks
-Raja

Chamu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response