(SELECT * FROM qiye where Bigclass='003' and title like '*灯芯绒*' order by jt desc) union all (SELECT * FROM qiye where Bigclass='003' and title like '*仿平绒*' order by jt desc)
我的要求是灯芯绒在前按jt排序,仿平绒在后也按jt排序
...全文
1029打赏收藏
合并排序???????????????
(SELECT * FROM qiye where Bigclass='003' and title like '*灯芯绒*' order by jt desc) union all (SELECT * FROM qiye where Bigclass='003' and title like '*仿平绒*' order by jt desc) 我的要求是灯芯绒在前按jt排序,仿平绒在后也按jt排序
(SELECT * FROM qiye where Bigclass='003' and title like '*灯芯绒*' order by jt desc)
union all
select * from (SELECT * FROM qiye where Bigclass='003' and title like '*仿平绒*' order by jt desc)
select * from (SELECT top 100 percent * FROM qiye
where Bigclass='003' and title like '*灯芯绒*' order by jt desc) t1
union all
select * from (SELECT top 100 percent * FROM qiye
where Bigclass='003' and title like '*仿平绒*' order by jt desc) t2
select *,id=case when title like '%灯芯绒%' then 1 when title like '%灯芯绒%' then 2 end from
(SELECT * FROM qiye where Bigclass='003' and title like '*灯芯绒*' order by jt desc) union all (SELECT * FROM qiye where Bigclass='003' and title like '*仿平绒*' order by jt desc) as ww order by id
select * from (
SELECT * FROM qiye where Bigclass='003' and title like '*灯芯绒*'
union all
SELECT * FROM qiye where Bigclass='003' and title like '*仿平绒*' ) a
order by jt desc
SELECT * FROM qiye where Bigclass='003' and title like '*灯芯绒*'
union all
SELECT * FROM qiye where Bigclass='003' and title like '*仿平绒*' order by jt desc