oracle可以进行手动排序吗

[复制链接]
查看11 | 回复2 | 2011-7-5 17:12:11 | 显示全部楼层 |阅读模式
假设:select * from (
select '1' id from dual
union all
select '2' from dual
union all
select '3' from dual
union all
select '4' from dual)
order by id
正常排序为:1

2

3

4
如果我想按自己想排的数据进行排序,怎么做,比如我想得出

3

1

4

2
怎么写


回复

使用道具 举报

千问 | 2011-7-5 17:12:11 | 显示全部楼层
decode
回复

使用道具 举报

千问 | 2011-7-5 17:12:11 | 显示全部楼层
dingjun123 发表于 2011-11-8 10:48
decode

谢谢兔子,好久没写了,差点把DECODE忘了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行