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 |
yonabout
Posting Yak Master
112 Posts |
Posted - 2006-11-15 : 07:09:31
|
Hi, probably a stupid question about triggers, but I'm not sure how to do this:When you're inserting or deleting, you get an "inserted" or "deleted" logical table with the inserted or deleted data.with an update trigger, is there an "updated" logical table that performs a similar job?The table the trigger will go on is being updated from an external program, not another table.Cheers,Yonabout |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-15 : 07:11:26
|
No, there is no "updated" tableIn other words, an Update is just Delete followed by Insert. So, you will get the old values for record in DELETED table and newly updated values in INSERTED table.Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
yonabout
Posting Yak Master
112 Posts |
Posted - 2006-11-15 : 07:12:07
|
OK, so how do i identify the updated data?Cheers,Yonabout |
 |
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-11-15 : 07:14:27
|
As Harsh told you, all the updated records will be in the Inserted Table.. in your update trigger.Chiraghttp://chirikworld.blogspot.com/ |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-11-15 : 07:36:30
|
Read about Triggers in sql server ehlp file for more informationMadhivananFailing to plan is Planning to fail |
 |
|
yonabout
Posting Yak Master
112 Posts |
Posted - 2006-11-15 : 08:10:41
|
Sorry about that, I didn't read the first reply properly.Thanks for your help.Cheers,Yonabout |
 |
|
|
|
|
|
|