Home >Database >Mysql Tutorial >Oracle内联,外联

Oracle内联,外联

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:08:501186browse

1.内联 a inner join b on a.id=b.id 查两张表都有的id记录。 2.左外联 a left join b on a.id=b.id 只要a表有,而b可没有对应的

1.内联

a inner join b on a.id=b.id

查两张表都有的id记录。

2.左外联

a left join b on a.id=b.id

只要a表有,而b可没有对应的记录。此时b表中的所有字段用null代替。

3.右外联

a right join b on a.id=b.id

和左外联相反,只要b表有,a表可没有对应的记录。

4.全外联

a full join b on a.id=b.id

a表或b表中存在都可。

linux

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