Metadata Functions (Transact-SQL)

THIS TOPIC APPLIES TO: yesSQL Server (starting with 2012)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

The following scalar functions return information about the database and database objects:

@@PROCID INDEX_COL
APP_NAME INDEXKEY_PROPERTY
APPLOCK_MODE INDEXPROPERTY
APPLOCK_TEST NEXT VALUE FOR
ASSEMBLYPROPERTY OBJECT_DEFINITION
COL_LENGTH OBJECT_ID
COL_NAME OBJECT_NAME
COLUMNPROPERTY OBJECT_SCHEMA_NAME
DATABASE_PRINCIPAL_ID OBJECTPROPERTY
DATABASEPROPERTYEX OBJECTPROPERTYEX
DB_ID ORIGINAL_DB_NAME
DB_NAME PARSENAME
FILE_ID SCHEMA_ID
FILE_IDEX SCHEMA_NAME
FILE_NAME SCOPE_IDENTITY
FILEGROUP_ID SERVERPROPERTY
FILEGROUP_NAME STATS_DATE
FILEGROUPPROPERTY TYPE_ID
FILEPROPERTY TYPE_NAME
FULLTEXTCATALOGPROPERTY TYPEPROPERTY
FULLTEXTSERVICEPROPERTY VERSION

All metadata functions are nondeterministic. This means these functions do not always return the same results every time they are called, even with the same set of input values.

See Also

Built-in Functions (Transact-SQL)