Oracle 按指定顺序排序

 

Oracle 按指定顺序排序

select tp_id from pro_type where tp_id in (select obj_tp_id from pro_object_occ where obj_mdl_id=238488)
and tp_id in (79217,79221,79218,79223,79219,79220,79222)
 order by DECODE(tp_id,'79217','1','79221','2','79218','3','79223','4','79219','5','79220','6','79222','7')

 

posted on 2015-01-17 16:51  忙碌ing  阅读(391)  评论(0)    收藏  举报

导航