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

左联查询

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;

posted @ 2018-01-09 18:11  菜鸟--自动化  阅读(401)  评论(0编辑  收藏  举报