---90-100的排在前面,然后按id排序
create table test5(id int);
begin
for i in 1 .. 10000
loop
insert into test5 values(i);
end loop;
end;
select id from test5 order by (case when id >=90 and id<=100 then 1 else 2 end
),id;
---90-100的排在前面,然后按id排序
create table test5(id int);
begin
for i in 1 .. 10000
loop
insert into test5 values(i);
end loop;
end;
select id from test5 order by (case when id >=90 and id<=100 then 1 else 2 end
),id;