欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

mysql点滴记录

程序员文章站 2022-04-28 10:57:08
...

mysql与oracle的确很多区别之处: 多表左链接链接: Select * FROM t1 LEFT JOIN (t2, t3, t4) ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c) delete别名问题: 如: delete from student a where a.id in (1,2);(执行失败) select a.* from student a where

mysql与oracle的确很多区别之处:

多表左链接链接:

Select * FROM t1 LEFT JOIN (t2, t3, t4) ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)



delete别名问题:

如:

delete from student a where a.id in (1,2);(执行失败)

select a.* from student a where a.id in (1,2);(执行成功)

怎么办呢?见下面办法

delete a from student a where a.id in (1,2);
在 delete 后加上 表的别名a 即可删除成功!