How can you get @@error and @@rowcount at the same time?
Answer Posted / pankaj
If @@Rowcount is checked after Error checking statement then
it will have 0 as the value of @@Recordcount as it would
have been reset. And if @@Recordcount is checked before the
error-checking statement then @@Error would get reset. To
get @@error and @@rowcount at the same time do both in same
statement and store them in local variable. SELECT @RC =
@@ROWCOUNT, @ER = @@ERROR
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What are the grouping functions?
can any body tell me how to know the password of current user in sql server
Is sql server free?
What is the synonym of join?
Explain the etl (extraction, transformation, and loading)?
Explain what is dbcc?
How to grant a permission in ms sql server using "grant execute" statements?
How to use go command in "sqlcmd"?
How to backup encryption key ?
Write query to return all rows sql?
Why use “nolock” in sql server?
Do you know clustered and non-clustered index?
Does a server store data?
Write a sql query to sort on different column name according to the parameters passed in the function?
What is replace and stuff function in sql server?