How can you get @@error and @@rowcount at the same time?

Answer Posted / laxman

SELECT @RC = @@ROWCOUNT
SELECT @ER = @@ERROR
if we use above statements then @@error will be reset with
0.
i think right one is

select @er=@@error,@rc=@@rowcount

Is This Answer Correct ?    31 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to execute a stored procedure in ms sql server?

733


Which language is supported by sql server?

705


What are the recovery models for a database?

813


What are approximate numeric data types in ms sql server?

760


What are the drawbacks of reporting in ssrs?

122






What are the advantages of log shipping?

735


How to backup encryption key ?

144


What are different backups available in sql server?

758


How to enter binary string literals in ms sql server?

822


How to connect php with different port numbers?

723


What is amo? : sql server analysis services, ssas

836


Explain in brief about Microsoft SQL server?

729


what is the sql equivaent of the dataset relation object ?

1727


What does man by sql wildcard characters in sql server?

709


what are defaults? Is there a column to which a default can't be bound? : Sql server database administration

796