sqlsql-servert-sqlschemabinding

T-SQL - Check if view is SCHEMABINDING


I tried to google it, but didn't found an answer...

Is it possible to check if view is created with SCHEMABINDING?


Solution

  • You've already accepted another answer, but the OBJECTPROPERTY() function can answer this directly:

    select objectproperty(object_id('viewname'), 'IsSchemaBound')
    

    Note also that sys.sql_dependencies is deprecated.