时间:2021-07-01 10:21:17 帮助过:4人阅读
Type = SqlFunc.IF(s.Type == 10).Return(1)
.ElseIF(s.Type == 20).Return(2)
.End(0)
等同于Select语句中的
(CASE
WHEN ( [s].[type] =10 ) THEN 1
WHEN ( [s].[type] = 20 ) THEN 2
ELSE 0
END ) AS [Type]
SqlSugar种CASE WHEN的用户
标签:lse code 语句 case when case ret cas fun turn