<p>What is the correct way to do this? For example, how would I change a stored procedure with this signature:</p>

<pre><code>CREATE PROCEDURE dbo.MyProcedure
  @Param BIT = NULL
AS
  SELECT *
  FROM dbo.SomeTable T
  WHERE T.SomeColumn = @Param
</code></pre>

<p>So that giving @Param with a value of 1 or 0 performs the filter, but not specifying it or passing NULL performs no filtering?</p>

Assuming that NULL means "don't care" then use
```
```
CREATE PROCEDURE dbo.MyProcedure 
   @Param BIT = NULL
AS
   SELECT *
   FROM dbo.SomeTable T
   WHERE T.SomeColumn = @Param OR @Param IS NULL
```
```