O'Reilly logo

Microsoft® SQL Server™ 2000 Programming by Example by Carlos Eduardo Rojas, Fernando G. Guerrero

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required