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
How you trouble shoot when any job fails
What are different types of views?
Explain what is use of dbcc commands?
How can we call UDF(User Define Function) using C# code in ASP.net ?
Difference between aggregate functions of sql?
Difference between group by clause and having clause in SQL?
How to create a ddl trigger using "create trigger" statements?
Explain the use of containers in ssis and also their types?
What are Row versions of DataRow?
What are the advantages of partitioning?
What is the use of attributehierarchyvisible ? : sql server analysis services, ssas
What have included columns when we talk about sql server indexing?
What do you know about normalization and de- normalization?
What is a table called, if it has neither cluster nor non-cluster index? What is it used for?
How to create new tables with "create table" statements in ms sql server?