SQL:insert 与where不可连用

SQL:insert 与where不可连用

Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘where confId = 5’ at line 1

在SQL语法中,insert不能与where联用;
如:
在这里插入图片描述

同样的业务需求可以用update + where来实现!

发布了69 篇原创文章 · 获赞 11 · 访问量 8450

猜你喜欢

转载自blog.csdn.net/qq_40994260/article/details/103704369
今日推荐