Open NeoZephyr opened 2 years ago
INSERT INTO block_detail (uid, block_count)
VALUES (?, 1) ON DUPLICATE KEY UPDATE block_count = block_count + 1
update namespace set version = case project_id
when 0 then 10
when 1 then 100
else 1000
end;
select
case
when gender = 0 then '男'
when gender = 1 then '女'
else '未知'
end as gender
from customer;
select if(gender = 0, '男', if(gender = 1, '女', '未知')) as gender
from customer;