MySQL Information Functions

This page lists several functions provided by MySQL to obtain commonly used information.

  1. BENCHMARK

    The MySQL BENCHMARK() function executes the specified expression repeatedly the specified number of times.
  2. CHARSET

    The MySQL CHARSET() function returns the character set of the specified string.
  3. COERCIBILITY

    The MySQL COERCIBILITY() function returns the mandatory value of the collation of the specified parameter.
  4. COLLATION

    The MySQL COLLATION() function returns the collation of the specified string.
  5. CONNECTION_ID

    The MySQL CONNECTION_ID() function returns the unique connection ID of the current connection.
  6. CURRENT_ROLE

    The MySQL CURRENT_ROLE() function returns a string representing the currently active roles for the current session, with multiple roles separated by commas.
  7. CURRENT_USER

    The MySQL CURRENT_USER() function returns the username and hostname of the MySQL account that the MySQL server uses to authenticate the current client.
  8. DATABASE

    The MySQL DATABASE() function returns the current database name as a string.
  9. ICU_VERSION

    The MySQL ICU_VERSION() function returns the version of the International Components for Unicode (ICU) library used to support regular expression operations.
  10. LAST_INSERT_ID

    The MySQL LAST_INSERT_ID() function returns the value generated by the last insert for the auto-increment column.
  11. ROLES_GRAPHML

    The MySQL ROLES_GRAPHML() function returns a string representing the GraphML document of the memory role subgraphs.
  12. ROW_COUNT

    The MySQL ROW_COUNT() function returns the number of rows affected by the execution of the last SQL statement.
  13. SCHEMA

    The MySQL SCHEMA() function returns the current database name as a string.
  14. SESSION_USER

    The MySQL SESSION_USER() function returns the username and hostname of the current MySQL account.
  15. SYSTEM_USER

    The MySQL SYSTEM_USER() function returns the username and hostname of the current MySQL account.
  16. USER

    The MySQL USER() function returns the username and hostname of the current MySQL account.
  17. VERSION

    The MySQL VERSION() return the version of the MySQL server as a string.