I have a stored procedure in MS SQL, that takes 2 parameteres, for example
CREATE PROCEDURE MyProcedure
@A INT,
@B INT
AS
BEGIN
SELECT ...
FROM ...
WHERE [A] = @A AND [B] = @B
END
My question is. if i have @B = 0 i want in the select row like this where [A]=@A,wthout the [B]=@B.. how can i achieve this with a minimum code? thanks alot