SCHEMATA (Transact-SQL)

 

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

Returns one row for each schema in the current database. To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA.view_name. To retrieve information about all databases in an instance of SQL Server, query the sys.databases (Transact-SQL) catalog view.

Column nameData typeDescription
CATALOG_NAMEsysnameName of current database
SCHEMA_NAMEnvarchar(128)Returns the name of the schema.
SCHEMA_OWNERnvarchar(128)Schema owner name.

 ** Important ** Do not use INFORMATION_SCHEMA views to determine the schema of an object. The only reliable way to find the schema of an object is to query the sys.objects catalog view.
DEFAULT_CHARACTER_SET_CATALOGvarchar(6)Always returns NULL.
DEFAULT_CHARACTER_SET_SCHEMAvarchar(3)Always returns NULL.
DEFAULT_CHARACTER_SET_NAMEsysnameReturns the name of the default character set.

System Views (Transact-SQL)
Information Schema Views (Transact-SQL)
sys.databases (Transact-SQL)
sys.schemas (Transact-SQL)
sys.syscharsets (Transact-SQL)

Community Additions

ADD
Show: