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 |
hissein
Starting Member
5 Posts |
Posted - 2012-08-07 : 23:23:27
|
Hi guys, Is there a way i can veryfiy the number of affected raws by a query (update or Delete) before executing? |
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2012-08-08 : 01:52:01
|
You can do this by running a SELECT statement over the exepected recordset. So, you could execute a SELECT , run some rules over the recordset - and then DELETE | UPDATE once confirmedJack Vamvas--------------------http://www.sqlserver-dba.com |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2012-08-08 : 03:02:08
|
You can use the Estimated Execution Plan to get a rough estimate. N 56°04'39.26"E 12°55'05.63" |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2012-08-08 : 16:42:01
|
Or u can doBEGIN TRANSACTION;GO-- ur queryGO-- Then select either of the followingCOMMIT TRANSACTION;GOrollback TRANSACTION;Srinika |
|
|
|
|
|