outer join test

create table t1_outerjoin(a int, b int , c int);
create table t2_outerjoin(a int);
create table t3_outerjoin(a int, b int);
create table t4_outerjoin(a int);


SELECT * FROM t1_outerjoin
                      LEFT JOIN
                      (t2_outerjoin, t3_outerjoin LEFT JOIN t4_outerjoin ON t3_outerjoin.a=t4_outerjoin.a)
                      ON (t1_outerjoin.a=t2_outerjoin.a AND t1_outerjoin.b=t3_outerjoin.b)
          WHERE t1_outerjoin.c > 5

 

posted @ 2018-08-27 21:17  友哥  阅读(104)  评论(0编辑  收藏  举报