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 is the synonym of join?
How to get a list of columns using the "sys.columns" view in ms sql server?
What samples and sample databases are provided by microsoft?
Where the sql logs gets stored? : sql server database administration
What is row_number () and partition by in sql server?
What is user-defined multi-statement table-valued function?
1.how to find the dead lock in sql server? 2.How to fine the memory leaks in sql server? 3.suppose transaction log file increasing what action will take ?
What are the triggers in sql?
What do you understand by replication in sql server?
How to download microsoft sql server 2005 express edition?
What is the cartesian product of the table?
What is an execution plan?
What is attribute hierarchy? : sql server analysis services, ssas
What is tabulation?
What do you understand by integration services in sql server?