![]() |
|
Triggers are stored procedures which are fired when data is modified in an underlying table. They can evaluate data being added to a table for validation purposes, or can make changes in that or other fields depending on the value of that data. You can use them even to execute a separate stored procedure, or to roll back a data modification or an entire transaction. Business - Click the link on the left to visit our partner sites under business/finance/loan/mortgage category Computers - Click the link on the left to visit our partner sites under computer hardware/software/peripheral category Internet - Click the link on the left to visit our partner sites under webhosting/webdesign/internet marketing category Software - Click the link on the left to visit our partner sites under software category Web Design - Click the link on the left to visit our partner sites under web design/development category Web Hosting - Click the link on the left to visit our partner sites under web hosting category Web Promotion - Click the link on the left to visit our partner sites under search engine optimization/internet marketing category Web Resources - Click the link on the left to visit our partner sites under other web category Recreation - Click the link on the left to visit our partner sites under travel/hotel/cruise category Casino - Click the link on the left to visit our partner sites under online gambling/poker/blackjack/roulette category Health - Click the link on the left to visit our partner sites under online pharmacy/hospital/health category Shopping - Click the link on the left to visit our partner sites under online shopping/gift category Miscellaneous - Click the link on the left to visit our partner sites under all other categories Triggers are created in the Enterprise Manager, or in the Query Analyzer through the object browser. There are also templates for triggers in the Query Analyzer (Edit|Insert Trigger). Triggers can be created with the following syntax: In earlier versions of SQL Server, triggers were used to maintain referential integrity. In current versions, constraints and foreign keys are used to accomplish much of those tasks, but triggers are still used to accomplish more complex tasks than that are available to the built in newer tools, such as complex column constraints, evaluation of tables in other databases, complicated defaults, or cascading routines involving multiple changes in multiple tables. |
| © Copyright 2006, databinary.com |