How do you find the error, how can you know the number of
rows effected by last SQL statement?

Answers were Sorted based on User's Feedback



How do you find the error, how can you know the number of rows effected by last SQL statement?..

Answer / chandra rekha

select @@error'Error'
select @@rowcount'Rows'

Is This Answer Correct ?    4 Yes 0 No

How do you find the error, how can you know the number of rows effected by last SQL statement?..

Answer / laxman

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

Is This Answer Correct ?    5 Yes 1 No

Post New Answer

More SQL Server Interview Questions

Difference between Inner vs outer joins?

0 Answers  


Suppose you want to implement the many-to-many relationships while designing tables. How would you do it?

0 Answers  


What are cursors and when they are useful?

0 Answers  


How to throw custom exception in Stored Procedure?

0 Answers   MCN Solutions,


how to find number of columns in a table in sql server 2000 and 2005 also

16 Answers   Virtusa,






What is compression - row-level and page-level compression?

0 Answers  


How to update values in a table with update statements in ms sql server?

0 Answers  


Can you explain the disadvantages/limitation of the cursor?

0 Answers  


How can you insert values in multiple rows using one Insert statement?

0 Answers   Flextronics, Thomson Reuters, Virtusa,


Anyone please explain me the concept of Serialization?

3 Answers  


What are mdf,ndf,ldf files and how to see the data in those files?

6 Answers   Accenture,


Is it true that rules do not apply to data already existing in a database at the time the rule is created?

0 Answers  


Categories