请大神指教、试了很多方法不行

解决方案 »

  1.   

    使用case 选择字段值
    select   case 
                when  t1.a > t2.a  and t1.a >t3.a then  t1.a else
                         when t2.a>t3.a then t2.a   else t3.a 
                end
    ...from t1,t2,t3 where t1.id =t2.id and t2.id=t3.id不同数据库,语法可能略有差异