create table test( id int primary key auto_increment, name ), sex int ) ),(),(),() ,'男','女') from test then '男' else '女' end as sex from test if([字段名]=[条件],[为真时返回],[为假时返回]) case [字段名] when [条件] then [为真时返回] else [为假时返回] end as sex from test case [字段名…