If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > default tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-27-04, 02:52
sachin71280 sachin71280 is offline
Registered User
 
Join Date: Feb 2004
Posts: 20
Exclamation default tables

hi all

is there any one who can tell the basic idea behind inserted, deleted mssql table. how these r affected on dml operations.

i m new to mssql.

thanks
Reply With Quote
  #2 (permalink)  
Old 04-27-04, 04:27
harshal_in harshal_in is offline
Registered User
 
Join Date: Jan 2003
Location: India
Posts: 523
Inserted and deleted are two special tables used in the trigger statements.

The deleted table stores copies of the affected rows during DELETE and UPDATE statements. During the execution of a DELETE or UPDATE statement, rows are deleted from the trigger table and transferred to the deleted table. The deleted table and the trigger table ordinarily have no rows in common.

The inserted table stores copies of the affected rows during INSERT and UPDATE statements. During an insert or update transaction, new rows are added simultaneously to both the inserted table and the trigger table. The rows in the inserted table are copies of the new rows in the trigger table.


Check BOL for more information.

Harshal.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On