How can you get @@error and @@rowcount at the same time?
Answer Posted / ramakrishna
DECLARE @RC int
DECLARE @ER int
INSERT INTO T(Cal1,Col2..)
SELECT ColX,ColY..
FROM T1
SELECT @RC = @@ROWCOUNT
SELECT @ER = @@ERROR
| Is This Answer Correct ? | 3 Yes | 16 No |
Post New Answer View All Answers
What different steps will a sql server developer take to secure sql server?
How to create a user name in a database?
Explain syntax for dropping triggers?
What are different types of raid levels?
How should i optimize the time for execution of stored procedure having single input and many output from the different tables?
List down some advantages of sql stored procedure?
Define Wed Edition in SQL Azure?
What is deploy, process and build? : sql server analysis services, ssas
Explain some stored procedure creating best practices or guidelines?
How to enter unicode character string literals in ms sql server?
How to maintain a fill factor in existing indexes?
What are the restraints imposed on the table design by a merge replication?
How to retrieve field values using mssql_result()?
What are the advantages dts has over bcp?
What is an identity?