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]
2023-12-24 08:11:16
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]
下一篇:SQL快速生成连续整数