September 2010
Intermediate to advanced
1704 pages
111h 8m
English
In SQL Server 2008, the object names that a stored procedure references do not have to exist at the time the procedure is created. SQL Server 2008 checks for the existence of database objects at the time the stored procedure is executed and returns an error message at runtime if the referenced object doesn’t exist. The only exception is when a stored procedure references another stored procedure that doesn’t exist. In that case, a warning message is issued, but the stored procedure is still created (see Listing 28.6).
Listing 28.6 Procedure Name Resolution During Stored Procedure Creation

When a table or view does exist ...