tags:

views:

79

answers:

1

I can list all views in SQL Server 2008 by using 'SELECT * FROM sys.views'

What I want to do is list only the views that are schema bound. How can I do this?

+3  A: 
SELECT * FROM sys.views WHERE OBJECTPROPERTY(object_id, 'IsSchemaBound')=1
Remus Rusanu
+1 another marvellous gem revealed by RR :-) Thanks!
marc_s
This is great, I'm curious now if there is a similar way to look for schema bound functions as well.
jpierson
@jpierson: replace `sys.views` with `sys.objects` and add `AND type = 'FN'`.
Remus Rusanu