Home  >  Article  >  Database  >  mysql点滴记录

mysql点滴记录

WBOY
WBOYOriginal
2016-06-07 15:40:121046browse

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


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn