| Author: chandramohan 30 Jun 2008 | Member Level: Gold | Rating: Points: 1 |
http://www.dotnetspider.com/qa/Question11643.aspx
http://blogs.crsw.com/mark/articles/253.aspx
http://courtesyindia.com/software/interview/asp.net/welcome.aspx
http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=12
http://faisalmb.com/kbinterviewaspnet.html
http://www.dotnetspider.com/qa/Question11643.aspx
http://blogs.crsw.com/mark/articles/253.aspx
http://courtesyindia.com/software/interview/asp.net/welcome.aspx
http://www.crsw.com/mark/Lists/Posts/Post.aspx?ID=12
http://faisalmb.com/kbinterviewaspnet.html
|
| Author: http://dotnetvj.blogspot.com 30 Jun 2008 | Member Level: Diamond | Rating: Points: 6 |
Hi
There are 2 Magic Tables in SQL server Inserted and Deleted. These are mantained by SQL server for Internal processing whenever an update, insert of delete occur on a table. However, we can refere these tables in a Trigger. Whenever an update table statement is fired SQL server mantains the original row before updation in a deleted table and New (updated )row in a Inserted Table.
Same is the case when an insert is fired Only Inserted table is populated with inserted Row. and when Delete table statement is fired Deleted table is populated with the deleted row.
Check out the below link for more information http://www.sql-server-performance.com/nn_triggers.asp
Thanks -- Vj http://dotnetvj.blogspot.com
Thanks -- Vj
http://dotnetvj.blogspot.com
|
| Author: Bunty 30 Jun 2008 | Member Level: Diamond | Rating: Points: 6 |
Hi,
Magic Tables: Whenever a trigger fires in response to the INSERT,DELETE,or UPDATE statement,two special tables are created.These are the inserted and the deleted tables.They are also referred to as the magic tables.These are the conceptual tables and are similar in structure to the table on which trigger is defined(the trigger table). The inserted table contains a copy of all records that are inserted in the trigger table. The deleted table contains all records that have been deleted from deleted from the trigger table.Whenever any updation takes place,the trigger uses both the inserted and deleted tables. Thanks and Regards S.S.Bajoria
Thanks & Regards S.S.Bajoria
|
| Author: Sandesh S 01 Jul 2008 | Member Level: Gold | Rating: Points: 0 |
In creating triggers we use the magic tables
|
| Author: Ratheesh 01 Jul 2008 | Member Level: Gold | Rating: Points: 1 |
While using triggers these Inserted & Deleted tables (called as magic tables) will be created automatically.
When we insert any record then that record will be added into this Inserted table initially, similarly while updating a record a new entry will be inserted into Inserted table & old value will be inserted into Deleted table.
In the case of deletion of a record then it will insert that record in the Deleted table
|