Menu

MariaDB Information Function

This page organizes MariaDB’s built-in functions for obtaining commonly used information.

  1. CHARSET()

    In MariaDB, CHARSET() is a built-in function that returns the character set of a given string.
  2. COERCABILITY()

    In MariaDB, COERCIBILITY() is a built-in function that returns the collation-enforced value for a given string argument.
  3. COLLATION()

    In MariaDB, COLLATION() is a built-in function that returns the collation for a given string.
  4. CONNECTION_ID()

    In MariaDB, CONNECTION_ID() is a built-in function that returns the unique ID for the current connection.
  5. CURRENT_ROLE()

    In MariaDB, CURRENT_ROLE() returns the single active role for the current session, or NULL when no role is active.
  6. CURRENT_USER()

    MariaDB CURRENT_USER() returns the account name and host the server uses to authenticate the client.
  7. DATABASE()

    In MariaDB, DATABASE() is a built-in function that returns the current database name as a string.
  8. FOUND_ROWS()

    In MariaDB, FOUND_ROWS() is a built-in function that returns the total number of rows for the last query that needed to count rows.
  9. LAST_INSERT_ID()

    In MariaDB, LAST_INSERT_ID() is a built-in function that returns the value generated by the auto AUTO_INCREMENT column for the last insertion.
  10. ROW_COUNT()

    In MariaDB, ROW_COUNT() is a built-in function that returns the number of rows affected by the last update, insert or delete statement.
  11. ROWNUM()

    Learn when MariaDB ROWNUM() is available, how it counts accepted rows, and why LIMIT or ROW_NUMBER() is better for predictable results.
  12. SCHEMA()

    In MariaDB, SCHEMA() is a built-in function that returns the current database name as a string.
  13. SESSION_USER()

    In MariaDB, SESSION_USER() is a built-in function that returns the username and hostname of the current MariaDB account.
  14. SYS_GUID()

    In MariaDB, SYS_GUID() is a built-in function that returns a 16-byte globally unique identifier (GUID).
  15. SYSTEM_USER()

    In MariaDB, SYSTEM_USER() is a built-in function that returns the username and hostname of the current MariaDB account.
  16. USER()

    In MariaDB, USER() is a built-in function that returns the username and hostname of the current MariaDB account.
  17. UUID_SHORT()

    In MariaDB, UUID_SHORT() is a built-in function that returns a short, conditionally unique Universal Identifier (UUID).
  18. UUID_v4()

    MariaDB UUID_v4() generates a random version 4 UUID. The function is available in MariaDB 11.7 and later.
  19. UUID_v7()

    MariaDB UUID_v7() generates a time-ordered version 7 UUID. The function is available in MariaDB 11.7 and later.
  20. UUID()

    MariaDB UUID() generates a version 1 UUID. Learn its format, platform behavior, replication caveat, and how it differs from UUID_v4() and UUID_v7().
  21. VERSION()

    In MariaDB, VERSION() is a built-in function that returns a UTF8 string representing the version of MariaDB server.