块我有下面的存储过程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子句是不正确的。任何人都可以建议如何解决它?