# Information Functions

- [BENCHMARK](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/benchmark.md): Execute an expression repeatedly. This function runs a scalar expression a specified number of times, primarily for measuring query execution speed.
- [BINLOG\_GTID\_POS](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/binlog_gtid_pos.md): Retrieve GTID position from a binary log file. This function returns the Global Transaction ID corresponding to a specific file and position in the binlog.
- [CHARSET](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/charset.md): Return the character set of a string. This function identifies the character set encoding used by the argument.
- [COERCIBILITY](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/coercibility.md): Determine collation coercibility. This function returns a numeric value indicating the priority of the argument's collation in comparison operations.
- [COLLATION](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/collation.md): Return the collation of a string. This function outputs the name of the collation rule used for sorting and comparing the string argument.
- [CONNECTION\_ID](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/connection_id.md): Return the connection ID. This function retrieves the unique thread identifier for the current client connection.
- [CURRENT\_ROLE](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/current_role.md): Returns the current role. The current role can be set with SET ROLE or SET DEFAULT ROLE.
- [CURRENT\_USER](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/current_user.md): Return the authenticated user name. This function displays the user name and host name combination used by the server to authenticate the current client.
- [DATABASE](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/database.md): Return the default database name. This function outputs the name of the currently selected database for the session.
- [DECODE\_HISTOGRAM](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/decode_histogram.md): Inspect histogram data. This function allows viewing the distribution statistics stored in a histogram for query optimization analysis.
- [DEFAULT](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/default.md): Return the default value for a column. This function retrieves the value assigned to a column if no explicit value is provided during insertion.
- [FOUND\_ROWS](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/found_rows.md): Count rows found by the last SELECT statement. This function returns the total number of rows matching the query, disregarding any LIMIT clause.
- [LAST\_INSERT\_ID](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/last_insert_id.md): Return the last automatically generated value. This function retrieves the most recent AUTO\_INCREMENT value generated by an INSERT statement.
- [LAST\_VALUE](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/last_value.md): Return the last value from a sequence. This function retrieves the most recently generated value from a sequence object.
- [PROCEDURE ANALYSE](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/procedure-analyse.md): Analyze query results. This procedure examines the result set and suggests optimal data types for columns based on the data.
- [ROW\_COUNT](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/row_count.md): Count rows affected by the last statement. This function returns the number of rows inserted, updated, or deleted by the previous DML operation.
- [ROWNUM](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/rownum.md)
- [SCHEMA](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/schema.md): Synonym for DATABASE(). Returns the name of the default database currently in use.
- [SESSION\_USER](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/session_user.md): Return the current user name. This function returns the user name and host name as provided by the client when connecting.
- [SYSTEM\_USER](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/system_user.md): Synonym for USER(). Returns the MariaDB user name and host name associated with the current session.
- [USER](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/user.md): Return the current MariaDB user. This function returns the user name and host name provided by the client upon connection.
- [VERSION](https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions/version.md): Complete VERSION reference for MariaDB. Complete function guide with syntax, parameters, return values, and usage examples with comprehensive examples and.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/sql-functions/secondary-functions/information-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
