ID NAME PATH TYPE 要写存储过程,TYPE=2 ----------------- select * from a order by case type when 2 then 0 else 1 end
所有数据都要显示出来 只是TYPE =2 的显示在最上面
select * from a where type='2' union all select * from a where type<>'2' order by type----------------- select * from a order by case type when 2 then 0 else 1 end ----------------- guys, wow~~~ it's wonderful
所有数据都要显示出来 只是TYPE =2 的显示在最上面,TYPE是随机排序
这样还不行吗???select * from a order by case type when 2 then 0 else 1 end
select * from a where type='2' union all select * from a where type<>'2' order by type 这个排序不正确
要写存储过程,TYPE=2
-----------------
select * from a
order by case type when 2 then 0 else 1 end
select * from a where type<>'2' order by type-----------------
select * from a
order by case type when 2 then 0 else 1 end
-----------------
guys, wow~~~ it's wonderful
order by case type when 2 then 0 else 1 end
select * from a where type<>'2' order by type
这个排序不正确