返回0行影响mysql
在MySQL中,我可以编写一个选择SQL命令,该命令在执行查询时返回0行而无需使用表名称吗?
我正在使用准备STMT并执行STMT,并且在运行执行时,我想在MySQL的消息输出中接收“ 0行”。
示例代码:
SET @del='SELECT ...';
PREPARE stmt from @del;
EXECUTE stmt;
感谢您的阅读。
p/s:我通过使用
SELECT 1 LIMIT 0;
In MySQL, can I write a select SQL command that return 0 row affected when executing query without using table name?
I am using prepare stmt and execute stmt, and I want to receive "0 row(s) affected" in message output from MySQL when running execute.
Sample code:
SET @del='SELECT ...';
PREPARE stmt from @del;
EXECUTE stmt;
Thanks for your reading.
P/s: I found a solution by using
SELECT 1 LIMIT 0;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论