12

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

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

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Alex Dn
  • 5,465
  • 7
  • 41
  • 79

2 Answers2

23

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.

Pondlife
  • 15,992
  • 6
  • 37
  • 51
3

I'm not aware of a direct way, but you could run

select * 
from sys.sql_dependencies
where class = 1 and object_id = object_id('<view name>');

If it returns values, the view is bound.

Alexey A.
  • 892
  • 11
  • 15