列表:A B C 代表三角形三条边
输出:
Isosceles
Equilateral
Scalene
Not A Triangle
代码如下:
select CASE
when (A + B) <= C then 'Not A Triangle'
when A = B and B = C then 'Equilateral'
when (A = B) or (B = C) or (A = C) then 'Isosceles'
when A != B and B != C and A != C then 'Scalene'
end from TRIANGLES