Using CASE WHEN


  • 5
    T
    SELECT x, y, z,
    CASE WHEN x+y<=z OR
              x+z<=y OR
              y+z<=x
         THEN 'No'
         ELSE 'Yes'
    END AS 'triangle'
    FROM triangle;
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.