title: SQL Statement Termination using RAISERROR
body: <p>(SQL 2005)
  Is it possible for a raiserror to terminate a stored proc.</p>
  
  <p>For example, in a large system we've got a value that wasn't expected being entered into a specific column. In an update trigger if you write:</p>
  
  <p>if exists (select * from inserted where testcol = 7)
  begin
     raiseerror('My Custom Error', 16, 1)
  end</p>
  
  <p>the update information is still applied.
  however if you run</p>
  
  <p>if exists (select * from inserted where testcol = 7)
  begin
     select 1/0
  end</p>
  
  <p>a divide by 0 error is thrown that actually terminates the update.
  is there any way i can do this with a raiseerror so i can get custom error messages back?</p>