首页  >  文章  >  数据库  >  mysql点滴记录

mysql点滴记录

WBOY
WBOY原创
2016-06-07 15:40:121046浏览

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 即可删除成功!


声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn