Mysql删除语句别名问题记录

在Mysql中,删除的时候加上别名导致报错,通过查阅资料发现是我们平时写的时候没有注意语法

// 平常写的语句
delete from TABLE where column1 = '';
// 错误的语句(单表)
delete from TABLE t where t.column1 = '';
// 正确的语句
delete t from TABLE t where t.column1 = '';
posted @ 2021-02-26 15:09  gnice512  阅读(110)  评论(0编辑  收藏  举报