1内连接
select a.* from table1 a , table2 b where a.id=b.id;
select a.* from table1 a join table2 b on a.id=b.id;
select a.* from table1 a inner join table2 b on a.id=b.id;
2外连接
左连接
select a.* from table1 a left join table2 b on a.id=b.id;
select a.* from table1 a left outer join table2 b on a.id=b.id;
select a.* from table1 a , table2 b where a.id=b.id(+);
右连接
select a.* from table1 a right join table2 b on a.id=b.id;
select a.* from table1 a right outer join table2 b on a.id=b.id;
select a.* from table1 a , table2 b where a.id(+)=b.id;
3笛卡尔积
select a.* from table1 a , table2 b ;
select a.* from table1 a cross join table2 b ;
4自然连接
select a.* from table1 a natura join table2 b ;