December 6, 2012

Schemas Catalog Views

Se more view version maps here: Microsoft Sql System View Version Maps

sys.schemas

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

Column name Sql 2005 Sql 2008 Sql 2008 R2 Sql 2012 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.

TSQL

Sql 2005
SELECT [name], [schema_id], [principal_id] FROM sys.schemas
Sql 2008
SELECT [name], [schema_id], [principal_id] FROM sys.schemas
Sql 2008 R2
SELECT [name], [schema_id], [principal_id] FROM sys.schemas
Sql 2012
SELECT [name], [schema_id], [principal_id] FROM sys.schemas

Back to Top

No comments:

Post a Comment

Total Pageviews