tags:

views:

29

answers:

2

SET NOCOUNT ON equalent function in MySql?

A: 

There is no equivalent as far as I am aware. Why are you concerned with this?

spinon
A: 

The SET NOCOUNT ON stops the message indicating the number of rows affected by a Transact-SQL statement from being returned as part of the results.

MySQL doesn't report the number of rows affected by a query, therefore there's no such function.

You can if you like find out about the number of affected rows using the ROW_COUNT() function, right after your query:

DELETE FROM mytable WHERE name="John";
SELECT ROW_COUNT();
Anax