SQL Queries To Retrieve The Views For A Specified SQL Database

 

Provided here you will find two SQL queries to allow you to list all of the Views from a specified SQL Database.

 

The first query uses the Tables Schema and the second one uses the Views Schema.

 

SQL Query: Tables Schema

 

Select

Table_Name

From Information_Schema.Tables

Where Table_Type = 'View'

Order By Table_Name

 

SQL Query: Views Schema

 

Select

Table_Name

From Information_Schema.Views

Order By Table_Name

 

 

Published Sunday, October 26, 2008 2:33 PM by dhite
Filed under:

Comments

No Comments