首页 > 数据库技术 > 详细

Mysql delete 表别名错误

时间:2020-05-05 01:20:06      阅读:94      评论:0      收藏:0      [点我收藏+]

自己写的mysql语句类似如下:

delete from ums_cart uc where uc.p_id = **

报错如下(语法错误):

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 ‘uc where uc.u_id =**} and uc.p_id = 2‘ at line 1

 

解决办法:

delete uc from ums_cart uc where uc.p_id = ** 即可  ,也即在 delete后跟表别名。

 

Mysql delete 表别名错误

原文:https://www.cnblogs.com/yzw-daemon/p/12829044.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!