Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
priyaram
Yak Posting Veteran
82 Posts |
Posted - 2005-06-09 : 12:07:02
|
HiI created a trigger to capture the changes in the table.That trigger will capture the old values and new values for particular column.Is ther any way that we can cature the entire record as before and after changefor update and delete.Thanks |
|
mpetanovitch
Yak Posting Veteran
52 Posts |
Posted - 2005-06-09 : 12:10:07
|
You can reference inserted and deleted as tables. These tables hold what was before and after in the table.Update (has inserted/deleted)Delete (has deleted)Insert (has inserted)From BOL:Two special tables are used in trigger statements: the deleted table and the inserted table. Microsoft® SQL Server™ 2000 automatically creates and manages these tables. You can use these temporary, memory-resident tables to test the effects of certain data modifications and to set conditions for trigger actions; however, you cannot alter the data in the tables directlyMike Petanovitch |
|
|
priyaram
Yak Posting Veteran
82 Posts |
Posted - 2005-06-09 : 13:03:28
|
i am getting what you are saying |
|
|
nr
SQLTeam MVY
12543 Posts |
|
Pakl
Starting Member
10 Posts |
Posted - 2005-06-14 : 03:54:03
|
Great articles... Thanks nr! |
|
|
|
|
|