#用在储存过程中: create procedure k() begin declare number int; )); case number then select '>0'; else select '=0'; end case; end$ #用在查询中: select case user when 'root' then 'yes' else 'no' end from mysql.user;select case when user='root' then 'yes' else 'no…