What is @@rowcount and with small code snippet explain the
usage?
Answer Posted / guest
@@rowcount gives the number of rows given as an result of
previous query ran.
Create procedure get_emp_count ( @emp_id int)
As
Select * from emp where emp_id =@emp_id
If @@rowcount = 0
Begin
Select 'no rows with emp_id= '
Select @emp_id
End
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
What are the namespaces used in ADO.Net to connect to a database?
Which object needs to be closed?
What are two important objects of ADO.Net?
How to store data in memory?
How can you identify whether or not any changes are made to the DataSet object since it was last loaded?
What is the difference between oledb sql server and oledbdotnet provider?
Explain the basic use of "dataview" and explain its methods.
What is executequery?
What is ado object model?
Command objects uses, purposes and their methods.
How to enable and disable connection pooling?
Which is the best method to get two values from the database?
What are the important features of ado.net 2.0?
What is ado.net connection?
What is a serialized object?