码迷,mamicode.com
首页 > 数据库 > 详细

MySQL查询

时间:2019-05-03 18:44:30      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:from   右连接   rom   select   sele   sql查询   left join   sel   where   

内连接 

select   a.*,b.* from tablename a inner join tablename b on a.id=b.id

等于

select a.*,b.* from tablename a,tablename b where a.id=b.id

 

左连接

select  a.*,b.* from tablename a left join tablename b on a.id=b.id

 

右连接

select  a.*,b.* from tablename a right join tablename b on a.id=b.id

 

MySQL查询

标签:from   右连接   rom   select   sele   sql查询   left join   sel   where   

原文地址:https://www.cnblogs.com/siyyawu/p/10805831.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!