SQL> select * from baltyp;
BALTYPCD
----------
note
odx
seb
abc
SQL> select baltypcd, decode(baltypcd,'note',0,'odx',1,'seb',2,3) resultid from b
altyp order by resultid;
BALTYPCD RESULTID
---------- ----------
note 0
odx 1
seb 2
abc 3
BALTYPCD
----------
note
odx
seb
abc
SQL> select baltypcd, decode(baltypcd,'note',0,'odx',1,'seb',2,3) resultid from b
altyp order by resultid;
BALTYPCD RESULTID
---------- ----------
note 0
odx 1
seb 2
abc 3
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-713968/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9240380/viewspace-713968/