SQL表连接查询(inner join、full join、left join、right join)

SQL表连接查询(inner join、full join、left join、right join)

SQL表连接查询(inner join、full join、left join、right join)_第1张图片
image.png

[图片上传中...(image.png-5bcac6-1511838943655-0)]

SQL表连接查询(inner join、full join、left join、right join)

SQL表连接查询(inner join、full join、left join、right join)_第2张图片
image.png

SQL表连接查询(inner join、full join、left join、right join)_第3张图片
image.png
比较常用的是第一种,内连接,而且是用这种写法:
select s.name,m.mark from student s,mark m where s.id=m.studentid

你可能感兴趣的:(SQL表连接查询(inner join、full join、left join、right join))