What is the best way to include an input param in the WHERE clause but exclude it if it is null?
WHERE
There are a number of ways I believe, but I can\'t seem
I think this will help
@id @name SELECT [Id],[Name] FROM [Person] WHERE Id = @id and ISNULL(@name, Name)
This will allow you just ignore the Name condition if it is null