Skip to content

Commit 2306df0

Browse files
authored
Refresh System information views article (PR 34602) (#34718)
1 parent 8cc396b commit 2306df0

File tree

1 file changed

+59
-73
lines changed

1 file changed

+59
-73
lines changed
Lines changed: 59 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
22
title: "System Information Schema Views (Transact-SQL)"
3-
description: "System Information Schema Views (Transact-SQL)"
3+
description: System information schema views are one method to provide SQL Server Database Engine metadata.
44
author: markingmyname
55
ms.author: maghan
6-
ms.date: "07/30/2019"
6+
ms.reviewer: randolphwest
7+
ms.date: 07/16/2025
78
ms.service: sql
89
ms.subservice: system-objects
910
ms.topic: "reference"
@@ -16,89 +17,74 @@ helpviewer_keywords:
1617
dev_langs:
1718
- "TSQL"
1819
---
19-
# System Information Schema Views (Transact-SQL)
20+
# System information schema views (Transact-SQL)
2021

2122
[!INCLUDE [SQL Server Azure SQL Database Azure SQL Managed Instance](../../includes/applies-to-version/sql-asdb-asdbmi.md)]
2223

23-
An information schema view is one of several methods [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] provides for obtaining metadata. Information schema views provide an internal, system table-independent view of the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] metadata. Information schema views enable applications to work correctly although significant changes have been made to the underlying system tables. The information schema views included in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] comply with the ISO standard definition for the INFORMATION_SCHEMA.
24-
25-
> [!IMPORTANT]
26-
> Some changes have been made to the information schema views that break backward compatibility. These changes are described in the topics for the specific views.
27-
28-
[!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] supports a three-part naming convention when you refer to the current server. The ISO standard also supports a three-part naming convention. However, the names used in both naming conventions are different. The information schema views are defined in a special schema named INFORMATION_SCHEMA. This schema is contained in each database. Each information schema view contains metadata for all data objects stored in that particular database. The following table shows the relationships between the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] names and the SQL standard names.
29-
30-
|SQL Server name|Maps to this equivalent SQL standard name|
31-
|---------------------|-----------------------------------------------|
32-
|Database|Catalog|
33-
|Schema|Schema|
34-
|Object|Object|
35-
|user-defined data type|Domain|
36-
37-
This name-mapping convention applies to the following [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] ISO-compatible views.
38-
39-
:::row:::
40-
:::column:::
41-
[CHECK_CONSTRAINTS](../../relational-databases/system-information-schema-views/check-constraints-transact-sql.md)
42-
43-
[COLUMN_DOMAIN_USAGE](../../relational-databases/system-information-schema-views/column-domain-usage-transact-sql.md)
44-
45-
[COLUMN_PRIVILEGES](../../relational-databases/system-information-schema-views/column-privileges-transact-sql.md)
46-
47-
[COLUMNS](../../relational-databases/system-information-schema-views/columns-transact-sql.md)
48-
49-
[CONSTRAINT_COLUMN_USAGE](../../relational-databases/system-information-schema-views/constraint-column-usage-transact-sql.md)
50-
51-
[CONSTRAINT_TABLE_USAGE](../../relational-databases/system-information-schema-views/constraint-table-usage-transact-sql.md)
52-
53-
[DOMAIN_CONSTRAINTS](../../relational-databases/system-information-schema-views/domain-constraints-transact-sql.md)
54-
55-
[DOMAINS](../../relational-databases/system-information-schema-views/domains-transact-sql.md)
56-
57-
[KEY_COLUMN_USAGE](../../relational-databases/system-information-schema-views/key-column-usage-transact-sql.md)
58-
59-
[PARAMETERS](../../relational-databases/system-information-schema-views/parameters-transact-sql.md)
60-
:::column-end:::
61-
:::column:::
62-
[REFERENTIAL_CONSTRAINTS](../../relational-databases/system-information-schema-views/referential-constraints-transact-sql.md)
63-
64-
[ROUTINES](../../relational-databases/system-information-schema-views/routines-transact-sql.md)
65-
66-
[ROUTINE_COLUMNS](../../relational-databases/system-information-schema-views/routine-columns-transact-sql.md)
67-
68-
[SCHEMATA](../../relational-databases/system-information-schema-views/schemata-transact-sql.md)
69-
70-
[TABLE_CONSTRAINTS](../../relational-databases/system-information-schema-views/table-constraints-transact-sql.md)
71-
72-
[TABLE_PRIVILEGES](../../relational-databases/system-information-schema-views/table-privileges-transact-sql.md)
73-
74-
[TABLES](../../relational-databases/system-information-schema-views/tables-transact-sql.md)
75-
76-
[VIEW_COLUMN_USAGE](../../relational-databases/system-information-schema-views/view-column-usage-transact-sql.md)
77-
78-
[VIEW_TABLE_USAGE](../../relational-databases/system-information-schema-views/view-table-usage-transact-sql.md)
79-
80-
[VIEWS](../../relational-databases/system-information-schema-views/views-transact-sql.md)
81-
:::column-end:::
82-
:::row-end:::
24+
An information schema view is one of several methods [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] provides for obtaining metadata. Information schema views provide an internal, system table-independent view of the [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] metadata. Information schema views enable applications to work correctly, although significant changes were made to the underlying system tables. The information schema views included in [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] comply with the ISO standard definition for the `INFORMATION_SCHEMA`.
25+
26+
> [!IMPORTANT]
27+
> Some changes were made to the information schema views that break backward compatibility. These changes are described in the articles for the specific views.
28+
29+
[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] supports a three-part naming convention when you refer to the current server. The ISO standard also supports a three-part naming convention. However, the names used in both naming conventions are different. The information schema views are defined in a special schema named `INFORMATION_SCHEMA`. This schema is contained in each database. Each information schema view contains metadata for all data objects stored in that particular database. The following table shows the relationships between the [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] names and the SQL standard names.
30+
31+
| SQL Server name | Maps to this equivalent SQL standard name |
32+
| --- | --- |
33+
| Database | Catalog |
34+
| Schema | Schema |
35+
| Object | Object |
36+
| User-defined data type | Domain |
37+
38+
This name-mapping convention applies to the following [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] ISO-compatible views.
39+
40+
- [CHECK_CONSTRAINTS](check-constraints-transact-sql.md)
41+
- [COLUMN_DOMAIN_USAGE](column-domain-usage-transact-sql.md)
42+
- [COLUMN_PRIVILEGES](column-privileges-transact-sql.md)
43+
- [COLUMNS](columns-transact-sql.md)
44+
- [CONSTRAINT_COLUMN_USAGE](constraint-column-usage-transact-sql.md)
45+
- [CONSTRAINT_TABLE_USAGE](constraint-table-usage-transact-sql.md)
46+
- [DOMAIN_CONSTRAINTS](domain-constraints-transact-sql.md)
47+
- [DOMAINS](domains-transact-sql.md)
48+
- [KEY_COLUMN_USAGE](key-column-usage-transact-sql.md)
49+
- [PARAMETERS](parameters-transact-sql.md)
50+
- [REFERENTIAL_CONSTRAINTS](referential-constraints-transact-sql.md)
51+
- [ROUTINE_COLUMNS](routine-columns-transact-sql.md)
52+
- [ROUTINES](routines-transact-sql.md)
53+
- [SCHEMATA](schemata-transact-sql.md)
54+
- [TABLE_CONSTRAINTS](table-constraints-transact-sql.md)
55+
- [TABLE_PRIVILEGES](table-privileges-transact-sql.md)
56+
- [TABLES](tables-transact-sql.md)
57+
- [VIEW_COLUMN_USAGE](view-column-usage-transact-sql.md)
58+
- [VIEW_TABLE_USAGE](view-table-usage-transact-sql.md)
59+
- [VIEWS](views-transact-sql.md)
8360

8461
Also, some views contain references to different classes of data such as character data or binary data.
8562

8663
When you reference the information schema views, you must use a qualified name that includes the `INFORMATION_SCHEMA` schema name. For example:
8764

8865
```sql
89-
SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLUMN_DEFAULT
90-
FROM AdventureWorks2022.INFORMATION_SCHEMA.COLUMNS
66+
USE AdventureWorks2022;
67+
GO
68+
69+
SELECT TABLE_CATALOG,
70+
TABLE_SCHEMA,
71+
TABLE_NAME,
72+
COLUMN_NAME,
73+
COLUMN_DEFAULT
74+
FROM INFORMATION_SCHEMA.COLUMNS
9175
WHERE TABLE_NAME = N'Product';
9276
```
9377

94-
## Permissions
95-
The visibility of the metadata in information schema views is limited to securables that a user either owns or on which the user has been granted some permission. For more information, see [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md).
78+
## Permissions
79+
80+
The visibility of the metadata in information schema views is limited to securables that a user either owns or on which the user is granted some permission. For more information, see [Metadata Visibility Configuration](../security/metadata-visibility-configuration.md).
81+
82+
Information schema views are defined server-wide and therefore can't be denied within the context of a user database. To `REVOKE` or `DENY` access (`SELECT`), the `master` database must be used. By default the public role has `SELECT`-permission to all information schema views but the content is limited with metadata visibility rules.
9683

97-
> [!NOTE]
98-
> Information schema views are defined server-wide and therefore cannot be denied within the context of a user database. To REVOKE or DENY access (SELECT), the master database must be used. By default the public role has SELECT-permission to all information schema views but the content is limited with metadata visibility rules.
84+
You can't deny access to information schema views in [!INCLUDE [ssazure-sqldb](../../includes/ssazure-sqldb.md)].
9985

100-
## See Also
86+
## Related content
10187

102-
- [System Views (Transact-SQL)](../../relational-databases/system-views/replication-views-transact-sql.md)
103-
- [Data Types (Transact-SQL)](../../t-sql/data-types/data-types-transact-sql.md)
104-
- [System Stored Procedures (Transact-SQL)](../../relational-databases/system-stored-procedures/system-stored-procedures-transact-sql.md)
88+
- [Replication Views (Transact-SQL)](../system-views/replication-views-transact-sql.md)
89+
- [Data types (Transact-SQL)](../../t-sql/data-types/data-types-transact-sql.md)
90+
- [System stored procedures (Transact-SQL)](../system-stored-procedures/system-stored-procedures-transact-sql.md)

0 commit comments

Comments
 (0)