Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create procedure doesn't fail when referencing nonexistent tables

Status
Not open for further replies.

vadimg

IS-IT--Management
Oct 25, 2001
152
0
0
US
hi.
when i create procedures that select form non-existing tables, the procedure compiles without error...

is there an option that would not allow creation of such procedures?
 
i guess not...


Referencing Objects
SQL Server allows the creation of stored procedures that reference objects that do not yet exist. At creation time, only syntax checking is done. The stored procedure is compiled to generate an execution plan when executed, if a valid plan does not already exist in the cache. Only during compilation are all objects referenced in the stored procedure resolved. Thus, a syntactically correct stored procedure that references objects which do not exist can be created successfully, but will fail at run time because referenced objects do not exist.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top