table: a
field : a1 a2 a3
a b c
d d d
e e e
table :b
field : b1 b2 b3
a b c
f f f
g g g
1,INNER JOIN
Example:
statement : select * from a inner join b on a.a1 = b.b1
results:
a1 a2 a3 b1 b2 b3
a b c a b c
2,LEFT JOIN = LEFT OUTER JOIN
Example:
statement : select * from a left join b on a.a1 = b.b1
results:
a1 a2 a3 b1 b2 b3
a b c a b c
d d d NULL NULL NULL
e e e NULL NULL NULL
3,RIHGT JOIN = RIGHT OUTER JOIN
Example:
statement : select * from a right join b on a.a1 = b.b1
results:
a1 a2 a3 b1 b2 b3
a b c a b c
NULL NULL NULL f f f
NULL NULL NULL g g g
4,FULL JOIN = FULL OUTER JOIN
Example:
statement : select * from a full join b on a.a1 = b.b1
results:
a1 a2 a3 b1 b2 b3
a b c a b c d d d NULL NULL NULLe e e NULL NULL NULLNULL NULL NULL f f f NULL NULL NULL g g g
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。