We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- SQL
- Advanced Select
- Type of Triangle
- Discussions
Type of Triangle
Type of Triangle
Sort by
recency
|
3560 Discussions
|
Please Login in order to post a comment
SELECT CASE WHEN a + b <= c OR a + c <= b OR b + c <= a THEN 'Not A Triangle' WHEN a != b AND b != c AND c != a THEN 'Scalene' WHEN a = b AND b = c THEN 'Equilateral' WHEN (a = b AND a != c) OR (a = c AND a != b) OR (b = c AND c != a) THEN 'Isosceles' END FROM triangles;
Select CASE WHEN A+B <= C OR A+C <= B OR B+C <= A THEN 'Not A Triangle' WHEN A=B AND B=C THEN 'Equilateral' WHEN A=B OR B=C OR A=C THEN 'Isosceles' ELSE 'Scalene' END AS TriangleType from TRIANGLES;
Select case when A + B <= C or B + C <= A or A + C <= B then "Not A Triangle" when A = B and B = C then "Equilateral" when A = B or B = C or A = C then "Isosceles" else "Scalene" end from Triangles
select case when (A=B and B=C) then "Equilateral" when (A=B or B=C or C=A) then "Isosceles" when ((A!=B and B!=C and C!=A) and !(A+B
Why this won't work