表中有A B C 三列,用SQL 语句实现?

表中有A B C 三列,用SQL 语句实现:当A 列大于B 列时选择A 列否则选择B 列,当B列大于C列时 选择B 列否则选择C 列

select (case when a>b then a else b end), (case when b>c then b esle c end) from table_name
温馨提示:答案为网友推荐,仅供参考
相似回答