SQL中的判断语句

表(TABLE)中有A B C三列,用SQL语句实现:当A列大于B列时选择A列否则选择B列,当B列大于C列时选择B列否则选择C列。
这个查询的SQL语句怎么写!!!急,谢谢

第1个回答  推荐于2017-04-22
select (case when a>b then a else b end ),
(case when b>c then b esle c end)
from table_name本回答被提问者采纳
第2个回答  2010-05-22
select case when a>b then a
when b>c then b
esle c end
from table_name
where ...
第3个回答  2019-09-08
select
(case
when
b=c
then
a
else
b
end)
from
A
相似回答