I just don´t understand why SQL Server doesn´t throw an error when you delete a column from a table, and that column is read by a View. To my understanding, SQL Server has that information, knows which columns/tables are read when you do a select query from a view, so i think it shoulnd´t let you delete a column referenced from a view, just like it doesn´t allow you to remove a column referenced by a FK…
There has to be an explanation to this, please someone tell me!
Thanks a lot.
I just don´t understand why SQL Server doesn´t throw an error when you delete
Share
Because you have to ask SQL Server to do this tracking. The option is called SCHEMABINDING:
The same option is also available on user defined functions, but unfortunately not on stored procedures.
It’s not set by default – it’s possible to construct a view that resolves its tables to different base tables for different users (assuming the users have different default schemas)