我有这个不返回任何内容的查询:
select
case when Username like 'participanta%' then
'Novice'
when Username like 'participantb%' then
'Experienced'
when Username like 'participantc%' then
'Master'
end as 'group'
from Users;
我只希望值是“新手”,如果Username
是这样participanta12
,依此类推。
我也试过这个查询,它只是摆脱Username like
了第二个和第三个之后when
:
select
case when Username like 'participanta%' then
'Novice'
when 'participantb%' then
'Experienced'
when 'participantc%' then
'Master'
end as 'group'
from Users;
还尝试了单个用户组:
select
case when Username like 'participanta%' then
'Novice'
end as 'group'
from Users;
仍然没有返回任何东西。