Home > Database > Mysql Tutorial > 10、MySQL入门小结_MySQL

10、MySQL入门小结_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:34:17
Original
879 people have browsed it

bitsCN.com

1.连接操作和集合操作(续)

由于mysql不支持full join,我么可以这样实现:

select * from a left join b on a.id = b.idunionselect * from a right join b on a.id = b.id
Copy after login
a.先查出左联接
b.查出右联接
c.用union把二者组合查询
注:组合查询union 、union all,union 是去掉重复行的集合;union all  是忽略重复行的完全集合
另外,目前的MySQL的集合操作只支持union并操作,对intersect、minus暂不支持。

2.学习SQL小结

网络上有很多SQL的教程,今天再看当年佳哥传的学习网址http://www.w3school.com.cn/sql/,感觉甚好(虽然很简单,毕竟SQL就很简单),在此感谢。
建议首先系统地学习下SQL,上述网址内容可以作为查询或强化之用。以前直接看网上内容,看过就忘了,当时主要是没有SQL学习的体系架构。

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template