The RAISERROR statement is used to intentionally raise an error in the T-SQL block. It can be used anywhere i.e. outside the TRY…CATCH block -- or inside the TRY block or inside CATCH block or inside the TRY and the -- CATCH block as well.