ÒªÔõÑùʵÏÖÄØ,È¡×î´óÖµ°É? case whenÈ¥ÅжÏ. Èç¹ûÏàµÈÄØ? SQL code: use tempdb if object_id('tb') is not null drop table tb go create table tb([a] INT,[b] INT,[c] INT) insert into tb select 2,4,5 union all select 4,2,1 union all select 1,6,4 go select * from tb /* a b c ----------- ----------- ----------- 2 4 5 4 2 1 1 6 4 */ select case when a >= b then a else (case when b >= c then b else c end) end as Col from tb /* Col ----------- 5 4 6 */