多表查询

多表查询:

  连接查询:
    内连接 inner join

    select *  

    from table A,table B 

    where tableA.id = tableB .table_id

 

    select *

    from tableB inner join tableA 

    on tableB.tableA_id = tableB.id

    外连接 left join  right join

  

 select *

    from tableB left join tableA 

    on tableB.tableA_id = tableB.id

   

 

posted @ 2018-08-21 21:51  端木祈月  阅读(93)  评论(0编辑  收藏  举报