mysql左联查询、右联查询和内联查询

时间:2018-01-09 19:29:37   收藏:0   阅读:381

左联查询

select * from a left join b on a.id=b.id;

右联查询

select * from a right join b on a.id=b.id;

内联查询

select a.name,b.class from a, b where c.id=b.id;

order by

select *from a order by desc#desc;降序排列,asc升序排列

group by

select count(scores)from group by calss;

having

select count(scores)from a group by class having count(scores>=70) order by desc;

原文:https://www.cnblogs.com/pingpingpingping/p/8252855.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!