Question

Given the following stored procedure definition

create procedure myproc
as

select * 
from sometablethatdoesnotexist

select somecolumnthatdoesnotexist 
from sometablethatdoesexist

Is it possible to configure sql-server (or localdb) to fail the creation of the stored procedure if at the time the stored procedure is created these objects do not exist? (either column or table)

Was it helpful?

Solution

No.

This is SQL Server's deferred name resolution.

There is no way of turning it off. It will fail if you reference a non existent column on an existing table though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top