Information Schema Views (T-SQL)

Microsoft® SQL Server™ provides two methods for obtaining metadata: system stored procedures or information schema views.


Note To obtain metadata, use system stored procedures, system functions, or these system-supplied views only. Querying the system tables directly may not provide accurate information if system tables are changed in future releases.


These views provide an internal, system table-independent view of the SQL Server metadata. Information schema views allow applications to work properly even though significant changes have been made to the system tables. The information schema views included in SQL Server conform to the SQL-92 Standard definition for the INFORMATION_SCHEMA.

SQL Server supports a three-part naming convention when referring to the current server. The SQL-92 standard also supports a three-part naming convention. However, the names used in both naming conventions are different. These views are defined in a special schema named INFORMATION_SCHEMA, which is contained in each database. Each INFORMATION_SCHEMA view contains metadata for all data objects stored in that particular database. This table describes the relationships between the SQL Server names and the SQL-92-standard names.

SQL Server name Maps to this equivalent SQL-92 name
database catalog
owner schema
object object
user-defined data type domain

This naming convention mapping applies to these SQL Server SQL-92-compatible views. These views are defined in a special schema named INFORMATION_SCHEMA, which is contained in each database. Each INFORMATION_SCHEMA view contains metadata for all data objects stored in that particular database.

In addition, some views contain references to different classes of data such as character data or binary data.

See Also
Data Types System Stored Procedures

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.