I currently have a saved proc that accepts a string
@vari as varchar(30)
if @vari is null
SELECT * FROM TABLE
else
SELECT * FROM TABLE WHERE col = @vari
endif
is there any way to embed the if statement, thereby not declaring 2 select just because of 1 param?
source
share