Does MySQL have an equivalent t开发者_开发问答o SQL Server's SET NOCOUNT ON
statement?
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();
There is no equivalent as far as I am aware.
精彩评论