본문 바로가기

웹프로그래밍/PHP

inner join, outer join

InnerJoin

select a.*, b.* from table1 a join table2 b on a.col1 = b.col1 ;

OuterJoin LeftJoin

select a.*, b.* from table1 a left join table2 b on a.col1 = b.col1 ;

OuterJoin RightJoin

select a.*, b.* from table1 a right join table2 b on a.col1 = b.col1 ;

반응형

'웹프로그래밍 > PHP' 카테고리의 다른 글

Mysql 기본 적인 쿼리들  (0) 2019.04.23