Sort by

recency

|

3305 Discussions

|

  • + 0 comments

    SELECT CASE WHEN A+B<=C OR B+C<=A OR C+A<=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 AS type_of_triangle FROM TRIANGLES; ....................................... using MsSql

  • + 0 comments
    select 
    case 
        when A+b > c and b+c > a and a+c>b then 
        case
        when A = b and B=c then 'Equilateral'
        when A=b or A=c or b=c then 'Isosceles'
        else 'Scalene'
        end
        else 'Not A Triangle'
    end
    from TRIANGLES 
    
  • [deleted]
    + 0 comments

    For MySQL

    SELECT
        CASE
            WHEN a+b<=c OR b+c<=a OR c+a<=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 AS type_of_triangle
    FROM triangles;
    
  • + 0 comments

    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' WHEN A != B AND B != C AND A != C THEN 'Scalene' END AS Triangle_Type FROM TRIANGLES;

  • + 0 comments

    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 A = C OR B = C THEN 'Isosceles' ELSE 'Scalene' END AS TypeTriangles FROM TRIANGLES