SQL語句 CASE WHEN的用法

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
相關文章
相關標籤/搜索