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
Explain how to copy the contents from one table to another table and how to delete the source table in ado.net?
What is the hierarchy of data in databases?
In how many ways we can retrieve table records count? How to find the count of records in a dataset?
What is the difference between Datareader and Dataset?
Explain advantages of ado.net?
What is the difference between executequery and executenonquery?
What are the different row versions available in table?
Define the data provider classes that is supported by ado.net?
What is fill method in ado.net?
How to copy the contents from one table to another table and how to delete the source table in ado.net?
What is ado net stands for?
Which is faster sqldataadapter and sqldatareader?
Explain the role of data provider in ado.net? What is the role of data provider in ado.net?
What is different between sqlcommand object and command behavior object?
What is Dataset Object?