title: How do I return an empty result set from a procedure using T-SQL?
body: <p>I'm interested in returning an empty result set from SQL Server stored procedures in certain events.</p>
  
  <p>The intended behaviour is that a L2SQL <code>DataContext.SPName().SingleOrDefault()</code> will result in CLR null value.</p>
  
  <p>I'm presently using the following solution, but I'm unsure whether it would be considered bad practice, a performance hazard (<em>I could not find one by reading the execution plan</em>), or if there is simply a better way:</p>
  
  <pre><code>SELECT * FROM [dbo].[TableName]
  WHERE 0 = 1;
  </code></pre>
  
  <p>The execution plan is a constant scan with a trivial cost associated with it.</p>
  
  <p>The reason I am asking this instead of simply not running any SELECTs is because I'm concerned previous SELECT @scalar or SELECT INTO statements could cause unintended result sets to be served back to L2SQL.  Am I worrying over nothing?</p>