Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,any body know help me how can i create trigger in sql
Posted

Here you go...[^]

So that search returned About 2,010,000 results enjoy :)
 
Share this answer
 
Comments
Rupa1 18-Feb-11 3:00am    
sir can i know what is the use of trigger Please tell me
Orcun Iyigun 18-Feb-11 11:39am    
a trigger lets you write a set of SQL statements that multiple applications can use. It lets you avoid redundant code when multiple programs need to perform the same database operation.
You can use triggers to perform the following actions:

•Create an audit trail of activity in the database. For example, you can track updates to the orders table by updating corroborating information to an audit table.
•Implement a business rule. For example, you can determine when an order exceeds a customer's credit limit and display a message to that effect.
•Derive additional data that is not available within a table or within the database. For example, when an update occurs to the quantity column of the items table, you can calculate the corresponding adjustment to the total_price column.
•Enforce referential integrity. When you delete a customer, for example, you can use a trigger to delete corresponding rows (that is, rows that have the same customer number) in the orders table.
you can navigate given links
Link1[^] and
Link2[^] and
Link3-[MSDN][^] to learn how to create trigger.
after that you can find plenty of links on Google
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900