我有一个这样的查询,但它不起作用,用 CASE EXPRESSION 的 IN 关键字有什么问题?
Select State = case c.addressId
when in('2552','2478','2526') then 'IN'
when in ('9999') then 'OUT'
else 'UNKNOWN'
end,
name, time
from x;
我使用的是 SQL Server 2008,这是错误消息:
关键字“in”附近的语法不正确。