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

Answer Posted / yjreddy

select @@ROWCOUNT
it will give the no of rows affected by last sql statement
select @@ERROR
it will display the error number for last sql statement

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is normalization of database? What are its benefits?

680


how will add additional conditions in sql?

739


Difference between drill down and drill through report.

726


Define inner join in sql server joins?

715


Explain the dbcc pintable command when would you use it?

685






What is stored in the mssqlsystemresource database? : sql server database administration

779


What is table constraint?

729


How can sql injection be stopped? : sql server security

713


What is co-related sub query?

733


what is database replication? : Sql server database administration

715


What is set nocount on?

682


How to use wildcard characters in like operations in ms sql server?

809


How to define the name and server for a new dsn?

723


What do you mean by normalisation?

681


User wants only to display only pdf as export option in report manager. How to achieve this?

212