表结构:
Customer
ID int not null,
Name varchar(100) null
询问:
SELECT ID,
(SELECT CASE WHEN (Name IS NULL AND Name <> '')
THEN CAST(1 AS BIT)
ELSE CAST(0 AS BIT) END
FROM Customer) AS IsNameNullOrWhitespace
这给了我“子查询返回超过 1 个值这是 ..”。为什么是这样?