开发者

Is there an equivalent to SQL Server's SET NOCOUNT in MySQL?

开发者 https://www.devze.com 2023-01-10 01:05 出处:网络
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 bein

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消