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
explain different levels of normalization? : Sql server database administration
what are the different ways of moving data/databases between servers and databases in sql server? : Sql server database administration
What is the difference between writing data to mirrored drives versus raid5 drives
What is sql service broker?
How to create function without parameter in sql server?
How to use go command in "sqlcmd"?
What is store procedure? How do they work? When do you use?
What is thr feature of change data capture?
Explain the first normal form(1nf)?
What is the process of normalising?
How to disconnect from a sql server using mssql_close()?
What is the native system stored procedure to execute a command against all databases?
What is Sqlpaging in SqlServer 2005 ?
How to use "begin ... End" statement structures in ms sql server?
What are the new scripting capabilities of ssms? : sql server management studio