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
A trigger can reference objects outside the current database? State true or false.
what is a correlated sub-query? : Sql server database administration
What are the benefits and tasks of object explorer? : sql server management studio
Will count(column) include columns with null values in its count?
What is the standby server?
What is primary key, unique key, and foreign key?
How can you tell if a database object is invalid?
What is normalization? Describe its different types.
What is database isolation in sql server? : sql server database administration
Are there issues when exporting SSRS reports into Microsoft Excel? When my users are trying to export a SSRS report into Microsoft Excel, one or two columns in the report appear to merge together. Why might this be?
What are a scheduled jobs?
Write a program using SQL queries to find a unique entry in a table.
Do you know how to implement service broker?
What is history table in sql server?
How do you set a trace flag in sql server?