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

Answer Posted / binoo tiku

@@error variable shows the error number of the last
T-SQL error

@@rowcount variable gives the number of rows affected by
the most recent SQL statements.

Is This Answer Correct ?    9 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that

1758


Write the SQL query to drop, truncate and delete table.

554


What happens on checkpoint?

618


What is the benefit of normalization?

595


What is delete query?

524






What is change data capture (cdc) feature?

592


Can primary key be null?

515


How to get the definition of a stored procedure back?

530


What are a database and a data warehouse?

575


What is a scheduled job or what is a scheduled task?

539


What is system stored procedures?

589


Can you use order by when defining a view?

575


How is sql server used?

549


what is a check constraint?

644


What is history table in sql server?

509