ホームページ >データベース >mysql チュートリアル >mysql点滴记录
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 即可删除成功!