title: SQL Server safely cast string and fail silently
body: <pre><code>declare @input varchar(255) = 'abc'
  
  select * from table where id = CAST(@input as int)
  </code></pre>
  
  <p>Can I do this so that the cast will fail silently, or default to some user-provided (or system default) value?</p>