How can you get @@error and @@rowcount at the same time?
Answer Posted / sachin rakshe
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 ? | 0 Yes | 0 No |
Post New Answer View All Answers
What happens when transaction log is full?
What do you mean by recursive stored procedure?
What is reportserver and reportservertempdb ?
What is difference between join and natural join?
What is bit data type?
What is unpivot?
How to read data in a table with "select" statements?
Do you know the different ddl commands in sql?
Hi all, can any one please tell me the difference between sql server 2008 and orace 9i
Explain can you implement data mining in ssrs?
What is the difference between a unique key and primary key?
Different types of keys in SQL?
can you instantiate a com object by using t-sql? : Sql server database administration
What is difference between equi join and natural join?
What is database isolation in sql server? : sql server database administration