SQL取行最大值

1
2
3
4
5
6
7
8
9
10
11
create table T(A decimal(10,1), B decimal(10,1), C decimal(10,1), D decimal(10,1), E decimal(10,1))
insert T select -21.5,-15.0,-5.0, null, null
union all select -5.5,-11.5,null, null, null
union all select -1.0,-16.5,-10.5, null, null
 
SELECT * FROM T
select *,
max_value=(
select max(A) from( select A union all select B union all select C union all select D union all select E)tmp
)
from T

SQL取行最大值,布布扣,bubuko.com

SQL取行最大值

上一篇:PS快速修复曝光不足照片的两种方法


下一篇:Oracle通过指令创建用户