SQL Trigger Example

preview_player
Показать описание
A trigger is a special kind of stored procedure, which is attached with a database table and gets executed automatically in response to certain action on the table like insertion, deletion or updating. You cannot invoke/call it manually, the only way to execute it is to do the required action on the table.

There are two types of Triggers:
1. After Triggers (For Triggers)
2. Instead Of Triggers

Presenter: Tapan Khatua, DotNet Developer, Mindfire Solutions
Рекомендации по теме
Комментарии
Автор

can you please help me with one query...
I have one main table with 50 colums. one history table it will store only updated columns of main table.
the update colums will store in single column by using cams.

kranthiideas
Автор

It will be right SET @CurrentSoldAmmount = (SELECT TotalSales FROM inserted)

keeww