我试图根据 CASE WHEN THEN tsql 语句返回真或假,但结果面板中唯一出现的是列名“IsGeneric”。
我哪里错了?
alter proc Storefront.proc_IsProjectGeneric
@ProjectID INT
AS
SET NOCOUNT ON;
SELECT 'IsGeneric'=CASE WHEN p.[GenericCatalogID] > 0 THEN CAST(1 AS BIT) ELSE CAST(0 AS BIT) END
FROM Storefront.Project p WITH(NOLOCK)
WHERE p.ID = @ProjectID;
SET NOCOUNT OFF;