title: How can I get number of deleted records?
body: <p>I have a stored procedure which deletes certain records. I need to get the number of deleted records. </p>
  
  <p>I tried to do it like this:</p>
  
  <pre><code>DELETE FROM OperationsV1.dbo.Files WHERE FileID = @FileID   
  SELECT @@ROWCOUNT AS DELETED;            
  </code></pre>
  
  <p>But DELETED is shown as 0, though the appropriate records are deleted. I tried SET NOCOUNT OFF; without success. Could you please help?
  Thanks.</p>