Inner Join

Natural Join

Automatically join tables by their column name.

select *
from registration 
	natural join course

Normal Join

manually specify the column name to join

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

Outer Join

Left out join

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

Right out join

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

Full outer join

select *
from student s 
	full outer join registration r
	on  r.sid = s.sid;


Published

02 May 2019

Category

development

Tags