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
Explain “row_number()” in sql server with an example?
How do you manipulate data?
1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?
Are there issues when exporting SSRS reports into Microsoft Excel? When my users are trying to export a SSRS report into Microsoft Excel, one or two columns in the report appear to merge together. Why might this be?
How do you run a trace?
explain what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration
How will you add a dimension to cube? : sql server analysis services, ssas
Find first and last day of current month in sql server
How you can get the list of largest tables in a database?
What is the difference between a unique key and primary key?
What is the difference between nvl and nvl2?
Give an example of why you would want to denormalize a database
What are the different types of join?
Can we delete data from a view?
Can we take the full database backup in log shipping?