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 is the difference between DataReader and DataSet in ADO.NET?
What is ado oledb and odbc?
How can I retrieve two tables of data at a time by using data reader? Data reader read and forward only, how is it possible to get 2 tables of data at a time?
If we are not returning any records from the database, which method is to be used?
How to check if the Dataset has records ?
What do you mean by ‘batch updates’?
Explain what is datagrid with an example?
Define the executescalar method?
What are the different methods by which we can populate a dataset?
What are the benefits of using of ADO.NET in .NET 4.0?
What is serialization and de-serialization in .net? How can we serialize the dataset object?
If a table contains 20000 records. In a page at each time 100 records to be displayed.
What is oledb connection?
Describe connection object in ado.net
What is the difference between a datareader and a dataset?