Site icon Database Tutorials

SQL Server Metadata Functions

I will tell you below metadata functions in this article.

APP_NAME Function:

This function returns the application name in which the session is executed.

COL_LENGTH Function:

COL_LENGHT functions returns the specified column’s lenght.

DATABASEPROPERTYEX Function:

This function returns the specified database’s option information.

You can query the following options:

SERVERPROPERTY Function:

This function returns the specified property of the instace.

You can query the following options:

DB_ID Function:

This function returns the database id.

DB_NAME Function:

This function returns the database name of the database id.

OBJECT_ID Function:

This function returns the object id of the object.

OBJECT_NAME Function:

This function returns the object name of the object id.

SCHEMA_ID Function:

This function returns the schema id of the schema.

SCHEMA_NAME Function:

This function returns the schema name of the schema id.

STATS_DATE Function:

This function returns the most recent time the statistics for a table or indexed view were updated.

Exit mobile version