Mysql delete 表别名错误
Posted 灰色の空
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mysql delete 表别名错误相关的知识,希望对你有一定的参考价值。
自己写的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 表别名错误的主要内容,如果未能解决你的问题,请参考以下文章