2011-09-13

TSQL - Raise error


IF(
      SELECT
            COUNT(*)
      FROM
            TABLE1
) = 0
BEGIN
      RAISERROR
      (
            'error message goes here'
            ,16 -- Severity.
            ,1 -- State
            ,1 -- myKey that was changed
      )
END
;

No comments:

Post a Comment