Answers for "nested if else mysql"

SQL
1

nested if in mysql

SELECT CASE col1
	WHEN 'agree' THEN 'Ok'
    ELSE
        CASE 
            WHEN col2 >= 1 THEN 'Ko'
            ELSE 'Maybe'
        END
END AS my_result
FROM table_name;
Posted by: Guest on July-04-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language