oracle 求多列最大值最小值SQL

select TC_ALLTA012,
       TC_ALLTA022,
       TC_ALLTA023,

       TC_ALLTA019,

       TC_ALLTA021,
       greatest(TC_ALLTA019, TC_ALLTA021) max,
       least(TC_ALLTA019,TC_ALLTA021) min
  from ds4.tc_allta_file
 where tc_plcma002 = 'SEKM320'

 

 

posted on 2011-11-07 13:15  Mayvar  阅读(413)  评论(0编辑  收藏  举报

导航