当前位置:网站首页>【mysql】--记一次delete删除语句使用别名的坑
【mysql】--记一次delete删除语句使用别名的坑
2022-08-06 00:27:00 【能能爱编程】
1、不使用别名的语句:
【delete from bbms.users where userid ='123';】
可以正常执行删除操作
2、使用别名的语句:
【delete from bbms.users u where u.userid ='123';】
不能正常删除,且报错:
【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 'u where u.userid ='123'' at line 1】
3、查阅资料得知:
不是不可以使用别名,而是应该在delete关键字的后面加上别名,如下:
【delete u from bbms.users u where u.userid ='123';】
这样就可以正常删除语句
边栏推荐
猜你喜欢
随机推荐
STM32 - USMART Debugging Component Experiment-M4
正则表达式完整入门教程,含在线练习
2022-08-05 The sixth group Hide spring study notes
Uniapp H5 public authorization number
redis面试题
横向联邦学习-梯度安全聚合
Detailed explanation of pod
【TA-霜狼_may-《百人计划》】美术2.6 PBR材质制作流程
VR全景在教育领域发展潜力如何?有哪些启发意义?
Spark基础【五种运行模式】
Day6:面试必考选择题
oracle学习笔记识别低效sql(十九)
基于隐语义模型的协同过滤推荐之用户商品推荐列表
MySQL:存储引擎
Distributed the second level cache components of actual combat (Redis + Caffeine implementation)
2022-08-05 第六小组 瞒春 学习笔记
Qt入门(一)——自己动动手写一个简易的用户化界面(Qt命令行模式)
在国信证券股票开户怎么样?安全吗?
【数学模型】层次分析
接口安全性测试该从哪些方面入手?








