Skip to content

Latest commit

 

History

History
55 lines (43 loc) · 2.32 KB

File metadata and controls

55 lines (43 loc) · 2.32 KB
title sys.schemas (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/15/2017
ms.prod sql
ms.prod_service database-engine, sql-data-warehouse, pdw
ms.reviewer
ms.technology system-objects
ms.topic language-reference
f1_keywords
schemas_TSQL
sys.schemas_TSQL
schemas
sys.schemas
dev_langs
TSQL
helpviewer_keywords
sys.schemas catalog view
ms.assetid 29af5ce5-2af7-4103-8f08-3ec92603ba05
author stevestein
ms.author sstein
monikerRange >=aps-pdw-2016||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current

Schemas Catalog Views - sys.schemas

[!INCLUDEtsql-appliesto-ss2008-xxxx-asdw-pdw-md]

Contains a row for each database schema.

Note

Database schemas are different from XML schemas, which are used to define the content model of XML documents.

Column name Data type Description
name sysname Name of the schema. Is unique within the database.
schema_id int ID of the schema. Is unique within the database.
principal_id int ID of the principal that owns this schema.

Remarks

Database schemas act as namespaces or containers for objects, such as tables, views, procedures, and functions, that can be found in the sys.objects catalog view.

Each schema has a an owner. The owner is a security principal.

Permissions

Requires membership in the public role. For more information, see Metadata Visibility Configuration.

See Also

Principals

Catalog Views (Transact-SQL)

Schemas Catalog Views (Transact-SQL)

sys.objects (Transact-SQL)