塊我有下面的存儲過程IF ELSE在SQL查詢
CREATE PROCEDURE sp1
(
@param1 bit,
@parma2 bit
)
AS
BEGIN
SELECT * from Table1 where
if @param1 = 1 then column1 is null
else if @parma2 = 1 then column1 is not null
END
顯然在中如果其他部分的where子句是不正確的。任何人都可以建議如何解決它?