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 |
V.V.
Starting Member
32 Posts |
Posted - 2010-12-22 : 13:22:48
|
Guys, I want to ask you something regarding an update. I queried one table in order to return me a specific row:SELECT * FROM XWHERE IDCLIENT='1234567890' AND CLIENTSERIES='0048'Ok. I wanted to update a status of this client from a to b.SELECT * FROM XUPDATE XSET STATUS=BWHERE IDCLIENT='1234567890' AND CLIENTSERIES='0048'The problem is that I forgot to comment the line with 'SELECT' and I selected with mouse this line too when I pressed F5. When i realized what have I done I stopped the operation. My question is if my table was somehow affected because I forgot to comment that line.In the result and also messages window nothing appeared like 'X row(s) affected' just 'Query was cancelled by user'. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
V.V.
Starting Member
32 Posts |
Posted - 2010-12-22 : 13:31:32
|
Ok, sorry for my bad english but in other words, the first operation in the query executed was the SELECT one and the UPDATE operation was the final one, right?Ok, so nothing have been changed. That's good.But what happens in case the operation is not cancelled? It updates me just that record because I mentioned the WHERE clause or something else also?Thanks very much. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
V.V.
Starting Member
32 Posts |
Posted - 2010-12-22 : 13:50:49
|
Thank you tkizer. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|