SCHEMA_NAME#
Returns the schema name associated with a schema ID.
Syntax#
SCHEMA_NAME ( [ schema_id ] )
Arguments#
schema_id
The ID of the schema. schema_id is an int. If schema_id is not defined, SCHEMA_NAME will return the name of the default schema of the caller.
Return types#
sysname
Returns NULL when schema_id is not a valid ID.
Example#
SELECT SCHEMA_NAME();