sql 行数据找出最大的及所有数据最大的

SELECT @charges=ISNULL(MAX(a.maxcharge), 0.00) FROM(
        SELECT (SELECT MAX(maxcharge)
        FROM(VALUES(ilongcharge),(iwidthcharge),(iheightcharge),(iweightcharge ),(ivolumecharge))
        AS maxcharge(maxcharge))AS maxcharge
        FROM @temp) a

 

posted @ 2019-03-21 09:54  世人皆萌  阅读(1826)  评论(0编辑  收藏  举报