sys.schemas (Transact-SQL)


THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabaseyesAzure SQL Data Warehouse yesParallel Data Warehouse

Contains a row for each database schema.

System_CAPS_ICON_note.jpg Note

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

Column nameData typeDescription
namesysnameName of the schema. Is unique within the database.
schema_idintID of the schema. Is unique within the database.
principal_idintID of the principal that owns this schema.

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.

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

Catalog Views (Transact-SQL)
Schemas Catalog Views (Transact-SQL)
sys.objects (Transact-SQL)

Community Additions