An Idea can change your life.....

Friday, November 27, 2009

What are the conditions under which a function can be schema bound?

What are the conditions under which a function can be schema bound?

A function can be schema bound only if the following conditions are true:
  • The function is a Transact-SQL function.
  • The user-defined functions and the views it references are also schema-bound.
  • The objects that the function references are referenced using a two-part name.
  • The function and the objects it references belong to the same database.
  • The user who executed the CREATE FUNCTION statement has REFERENCES permission on the database objects that the function references.
  • SCHEMABINDING cannot be specified for functions that reference alias data types or CLR functions.

No comments: