What is @@rowcount and with small code snippet explain the
usage?

Answer Posted / jagan

@@ROWCOUNT:

Returns the number of rows affected by the last statement.


ex:

UPDATE authors SET au_lname = 'Jones'
WHERE au_id = '999-888-7777'
IF @@ROWCOUNT = 0
print 'Warning: No rows were updated'

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is data control techniques?

509


What are the various methods provided by the DataSet object to generate XML?

589


Define isolation?

535


What is ado asp?

513


What is Data view?

562






What is ole in vb?

510


What is sql command in ado net?

503


What is bubbled event can you please explain?

527


Do you use stored procedure in ado.net?

546


If we are not returning any records from the database, which method is to be used?

757


Explain the different row versions available in table?

548


What is row state?

527


How to create data relations?

550


What is ado.net full form?

558


What is meant by executenonquery?

529