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.
Question
I tried to google it, but didn't found an answer...
Is it possible to check if view is created with SCHEMABINDING?
La 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.
Autres conseils
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.