I need an sql query to enumerate all views (I only need the view names) of a specific database in SQL Server 2005. Thanks in advance!
相关问题
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
Some time you need to access with
schema
name,as an example you are using AdventureWorks Database you need to access with schemas.To finish the set off (with what has already been suggested):
This gives extra properties on each view, not available from sys.objects (which contains properties common to all types of object) or INFORMATION_SCHEMA.VIEWS. Though INFORMATION_SCHEMA approach does provide the view definition out-of-the-box.
Run this adding DatabaseName in where condition.
or remove where condition adding use.