Preventing the Alteration of Dependent Objects:The SCHEMABINDING Option
You can prevent changes on the dependent objects of a user-defined function by using the SCHEMABINDING option. Using this option, you cannot modify the definition of the dependent objects using any of the ALTER statements, and you cannot drop dependent objects using any of the DROP statements. This link disappears when the function is dropped or when you alter the function definition without using the SCHEMABINDING option.
To use this option, you must ensure that the following conditions are met:
Every function and view referenced in the function must be defined as SCHEMABINDING as well.
Every object referenced in the function must be referenced using two-part names (owner.objectname ...
Get Microsoft® SQL Server™ 2000 Programming by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.