그저 그런 널널 한 얘기 들 . ....... : ( 영문 ) Working with Triggers 
 ( 영문 ) Working with Triggers DataBase ( MS SQL ) 
 engjjang . egloos . com / 482697 
 A trigger is a special kind of stored procedure that runs when you modify data in a specified table using one or more of the data modification operations : UPDATE , INSERT , or DELETE . Special triggers known as INSTEAD OF triggers can specify modifications to a view ' s underlying base tables . 
 Triggers are also useful for enforcing referential integrity , which preserves the defined relationships between tables when you add , update , or delete the rows in those tables . However , the best way to enforce referential integrity is to define primary key and foreign key constraints in the related tables . If you use database diagrams , you can create a relationship between tables to automatically create a foreign key constraint . For details , see Table Relationships . 
 Triggers are automatic . They are activated immediately after any modification to the table ' s data , such as a manual entry or an application action . 
 Triggers can cascade changes through related tables in the database . For example , you can write a delete trigger on the title _ id column of the titles table to cause a deletion of matching rows in other tables . The trigger uses the title _ id column as a unique key to locate matching rows in the titleauthor , sales , and roysched tables . 
 Note With SQL Server 2000 , you can also cascade changes through related tables by setting the CASCADE UPDATE or DELETE ( or both ) constraints on a foreign key constraint . 
 Triggers can enforce restrictions that are more complex than those defined with check constraints . Unlike check constraints , triggers can reference columns in other tables . For example , a trigger can roll back updates that attempt to apply a discount ( stored in the discounts table ) to books ( stored in the titles table ) with a price of less than $ 10 . 
 For details about working with triggers , see the following topics . 
 Create new triggers Creating a Trigger 
 Open existing triggers Opening a Trigger 
 Save triggers to your project Saving a Trigger 
 Use INSTEAD OF triggers Using INSTEAD OF Triggers on Views 
 Delete stored triggers Deleting a Trigger 
 For more information and examples of triggers , see the documentation for your database server . If you are using Microsoft SQL Server , see " CREATE TRIGGER " in SQL Server Books Online . 
 http : / / msdn 2 . microsoft . com / en - us / library / aa 292969 ( VS . 71 ) . aspx 
 다음 글 : 이란 로켓 발사 성공 의 국제 정치 적 , 군사 적 의미 
 이전 글 : ( 영문 ) Use Stored Procedures for Updates and Insertions