left join 和inner join的区别

left join

select * from table t1

left join table2 t2 

on t1.id=t2.id

如果t1有5条数据,t2没有数据,请问查出()条数据

 

inner join

select * from table t1

inner join table2 t2 

on t1.id=t2.id

如果t1有5条数据,t2没有数据,请问查出()条数据 

 

答案:第一题:5;解析:因为左连接

   第二题:0;解析xxx

 

posted @ 2021-12-20 17:14  创嗨  阅读(37)  评论(0编辑  收藏  举报