当前位置:网站首页>[mysql]--remember a delete delete statement using an alias pit
[mysql]--remember a delete delete statement using an alias pit
2022-08-06 00:30:00 【can love programming】
1. Statements that do not use aliases:
[delete from bbms.users where userid ='123';]
Delete operations can be performed normally
2. Statements using aliases:
[delete from bbms.users u where u.userid ='123';]
Cannot be deleted normally, and an error is reported:
【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. Check the information to find out:
It's not that aliases cannot be used, but aliases should be added after the delete keyword, as follows:
[delete u from bbms.users u where u.userid ='123';]
This will delete the statement normally
边栏推荐
猜你喜欢

redis面试题

QML绘图系统

在VR里弹空气吉他?开发者:手势优化有技巧

wsa无法安装如何解决

解决mysql语句MAX()函数中出现的问题

从零开始用C#做产品:私人日记(14)Sqlite封装

Solve the problems arising from the mysql statement MAX () function

eBay, Amazon, Lazada, Shopee, AliExpress, Meikeduo and other cross-border e-commerce platforms, what conditions do I need to meet to evaluate the self-supporting account?How to optimize listing?

PMP备考|通关宝典

【kali-漏洞利用】(3.2)Metasploit基础(中):Armitage工具利用过程
随机推荐
el-table的暂无数据怎么变成图片加文字按钮?
17、学习MySQL 事务
kappa coefficient---study notes
FPGA IIC SLAVE 实现
eBay, Amazon, Lazada, Shopee, AliExpress, Meikeduo and other cross-border e-commerce platforms, what conditions do I need to meet to evaluate the self-supporting account?How to optimize listing?
Kubernetes网络模型
代码随想录笔记_动态规划_494目标和
【TA-霜狼_may-《百人计划》】图形2.7.2 GPU硬件架构概述
网页使用微信扫码登录
物理 NFT 有什么特别之处?
2022 China Health Exhibition, Shandong Health Exhibition, Jinan Health Exhibition, Health Industry Exhibition
Is it safe to choose a mobile phone application for a securities account?
GPS-based NTP time synchronization server
[kali-vulnerability exploitation] (3.2) Metasploit basics (middle): Armitage tool exploitation process
隐私计算基础组件系列-混淆电路
Day4:面试必考选择题
How to view code comments in Idea Modified by?
熵力(entropic force)
2022中国大健康展,山东大健康展,济南健康展,健康产业展
Go-Excelize API源码阅读(一)——NewFile()