RDBMS Join Comparison

Inner Join

Natural Join

Automatically join tables by their column name.

1
2
3
select *
from registration
natural join course

Normal Join

manually specify the column name to join

1
2
3
4
select *
from registration r
[inner] join course c
on (r.cid = c.cid);
1
2
3
select *
from registration r, course c
where r.cid = c.cid;

Outer Join

Left out join

1
2
3
4
select *
from student s
left [outer] join registration r
on (r.sid = s.sid);

Right out join

1
2
3
4
select *
from student s
right [outer] join registration r
on (r.sid = s.sid);

Full outer join

1
2
3
4
select *
from student s
full outer join registration r
on r.sid = s.sid;

RDBMS Join Comparison
https://rug.al/2019/2019-05-02-rdbms-join-comparison/
Author
Rugal Bernstein
Posted on
May 2, 2019
Licensed under