Question

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

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

Était-ce utile?

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top