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 |
Auris
Starting Member
7 Posts |
Posted - 2012-05-23 : 06:52:35
|
hi guys, i have this sql update statement written and i dont understand how it acually knows which record/s to update. Its from the production and its working correctly for 4 years, the problem is we are implementing some changes and now i need to udpate it.UPDATE RiskSubjectivitySET RiskId = e.RiskIdFROM RiskCorrespondence rcJOIN Endorsement eON e.AppliedToRiskId = rc.RiskIdWHERE e.RiskId = @RiskIdthe question is how does it determines which RiskSubjectivity row to update since no join is applied to it? i have written update and delete joins but i have never seen one like this. explanation or an article on the topic would be good.Thank youLife is hard. It's even harder if you're stupid. |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-05-23 : 09:35:07
|
What I see is: all rows will be affected but maybe there is only one row in table RiskSubjectivity... No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|