T-SQL Tutorial

T-SQL Object_Schema_Name


T-SQL Object_Schema_Name metadata function returns the database schema name of objects.

Object_Schema_Name Syntax:

OBJECT_SCHEMA_NAME ( object_id [, database_id ] )

Object_Schema_Name Example:

SELECT OBJECT_SCHEMA_NAME(279672044) AS 'Schema object name of View',
OBJECT_SCHEMA_NAME(245575913,2) AS 'Schema object name of Table';

Schema object name of ViewSchema object name of Table
dbodbo

See also: T-SQL Functions -> OBJECT_NAME | SCHEMA_ID | SCHEMA_NAME