mysql delete 删除时表明不能起别名You have an error in your SQL syntax; check the manual that corresponds to yo

java面试题网站:www.javaoffers.com

delete from tableName a where a.XX = 'XX'

 上面会报错:

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 'a where a.login_name = 'lifei'' at line 1

删除时表明不能起别名,所以要改成

delete from tableName where XX='XX'

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用[1]:错误代码: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 'Continue at line 1。引用[2]:其中遇到了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 '1)' at line 1的报错,在网上找了好久,也没有解决。后来自己查了很多资料,才得以解决,现在根据自身加以总结。引用[3]:1064 - You have an errorin your SQL syntax check the manual that corresponds to yourMySQl sever version for the right syntax to use near -2147483648)ONUPDATE CURRENT_TIMESTAMP(-2147483648)COMMENT '创建建间`, 这个是我在navicat中建表出的错误。 问题: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use的意思是什么?如何解决这个问题? 回答: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use"这个错误提示意味着在你的SQL语法中存在错误,需要检查与你的MySQL服务器版本相对应的手册,以了解正确的语法使用方法。这个错误通常是由于SQL语句中的某些语法错误导致的。 要解决这个问题,你可以按照以下步骤进行操作: 1. 仔细检查你的SQL语句,确保语法正确。可以参考MySQL官方文档或其他可靠的资源来学习正确的SQL语法。 2. 确认你的MySQL服务器版本与你使用的SQL语法兼容。不同的MySQL版本可能会有一些差异,你需要根据你的服务器版本来选择正确的语法。 3. 如果你仍然无法解决问题,可以尝试在网上搜索类似的错误信息,看看其他人是如何解决的。也可以在相关的技术论坛或社区寻求帮助,向其他有经验的开发者请教。 总之,要解决"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use"这个问题,你需要仔细检查SQL语句的语法,并确保与你的MySQL服务器版本相匹配。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值