• What is the difference between a CHECK CONSTRAINT and error handling?

    A CHECK CONSTRAINT will automatically throw an error in response to the insertion of invalid data.

    TRY + CATCH can be used to handle (ie: suppress and programmaticaly respond to) an error.

    THROW | RAISERROR can be used to programmatically raise an error.

    BTW: This type of "explain the difference between" question is good for asking candidates during intermediate level interviews.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho