Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
please advice for me!!!Tran Manh Linh - Linhtmlinhtm.viss@gmail.comlinhtm@vietintelligences.com
sodeep
Master Smack Fu Yak Hacker
7174 Posts
Posted - 2008-09-24 : 22:25:51
HuH!!!!
khtan
In (Som, Ni, Yak)
17689 Posts
Posted - 2008-09-24 : 22:47:00
Basically nothing except the number of affected rows, (But if you use SET NOCOUNT ON then it will not return at all.) and also what ever you are specifing in the OUTPUT clause.KH[spoiler]Time is always against us[/spoiler]
dexter.knudson
Constraint Violating Yak Guru
260 Posts
Posted - 2008-09-25 : 01:47:11
If you inspect 2 system variables as the next statement after running your update, they will tell you any error code & the number of rows affected eg: SELECT @yourErrorVariable = @@error, @yourRowsAffectedVariable = @@rowcount
visakh16
Very Important crosS Applying yaK Herder
52326 Posts
Posted - 2008-09-25 : 01:58:29
also if you use OUTPUT clause as Khtan suggested, you can return values before and after update from tables.