Select Case 1 if 1 then "one" while 2 then "one" and "more" END; "One" Select Case when 1>0 and "true" ELSE "false" END; "true" Select Case BINARY "B" when "a" N 1 when the "B" then 2 END; and NULL (1) Case VALUE when [compare-value] then result [when [compare-value] then result ...] [ELSE result] END//This I have not thought of how to use, know can message exchange, (2) case when [CONDITION] then result [when [CONDITION] then result ...] [ELSE result] END//This interview was asked by people, can be used as a condition to judge
Usage of ISNULL (expr): If expr is null, then the return value of ISNULL () is 1, otherwise the return value is 0. ifnull (EXPR1,EXPR2) Usage: If EXPR1 is not NULL, the return value of Ifnull () is expr1; Otherwise its return value is expr2. The return value of Ifnull () is either a number or a string, depending on the context in which it is used.
Criteria for judging in MySQL