o(* ̄︶ ̄*)o

  博客园  :: 首页  ::  :: 联系 :: 订阅 订阅  :: 管理
--查询
select * from 表名;

--表别名
select * from 表名 t;

--表别名查询字段
select t.id from 表 t;

--表别名查询条件
select * from 表 t where t.id = 2;

--left join
select * from 表1 t1 left join 表2 t2 on t1.id = t2.id;

--表分组

--表union
--warnig : 两张表,字段需要一样
select * from (select * from 表1 union select * from 表2);

--表排序

  

posted on 2019-03-25 11:43  熊本熊の熊  阅读(183)  评论(0编辑  收藏  举报