select Id ,
case when Id=1 then '等于1'
when Id >=60 then '大于60' --注意各结果的数据类型须一致,int和时间等不能转为字符串没出错
when Id <60 then '小于60'
else 'ok' end
AS result ,
OwnId
from ContentDetectionRecord
更多推荐
SQL语句 CASE WHEN的用法
发布评论