CREATE PROC test
SELECT s_name,t_name FROM table_not_exist
Watching Out for Deferred Name Resolution – SQLServerCentral[^]: You may be wondering why SQL Server lets you do something so stupid, but there is a good reason. Many stored procs have steps with tables, possibly temp tables or table variables, that are created inside the proc. You can also have dynamically created T-SQL in a proc. If the table names were resolved at create time, then it would not be possible to do these things.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)