• + 0 comments

    Select case( when a=b and b=c and a=c then 'equilateral' when a!=b and a!=c and b!=c then 'scalene' when a+b<=c or a+c<=b or b+c<=a then 'not a triangle' when (a=b and b!=c) or (b=c and b!=a) or (a=c and c!=b) then 'isoceles') else 'no' end case from trianlges

     for the above i get the error:
    - ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'when a=b and b=c and a=c then 'equilateral'
    when a!=b and a!=c and b!=c then' at line 3
    

    Please help me spot the error and why this query wouldn't work

        ``