• Good article, but I have only one disagreement. Instead of PRINT statements, I prefer to use RAISERROR. With RAISERROR, you can pass in variables to make the error message descriptive, plus it actually produces an error, which can be caught and rethrown by the calling procedure if necessary. Example:

    
    
    CREATE PROC MyProc1
    @LastName VARCHAR(30) = ''
    , @FirstName VARCHAR(30) = ''
    AS
    IF @LastName = '' OR @FirstName = '' BEGIN
    RAISERROR('MyProc1 expects both parameters @FirstName and @LastName. Both are VARCHAR(30). Values supplied were @LastName: %s and @FirstName: %s', 16, 1, @LastName, @FirstName)
    END
    ...

    Just my 2 cents.