MySQL Information Functions
This page lists several functions provided by MySQL to obtain commonly used information.
-
BENCHMARK
The MySQLBENCHMARK()function executes the specified expression repeatedly the specified number of times. -
CHARSET
The MySQLCHARSET()function returns the character set of the specified string. -
COERCIBILITY
The MySQLCOERCIBILITY()function returns the mandatory value of the collation of the specified parameter. -
COLLATION
The MySQLCOLLATION()function returns the collation of the specified string. -
CONNECTION_ID
The MySQLCONNECTION_ID()function returns the unique connection ID of the current connection. -
CURRENT_ROLE
The MySQLCURRENT_ROLE()function returns a string representing the currently active roles for the current session, with multiple roles separated by commas. -
CURRENT_USER
The MySQLCURRENT_USER()function returns the username and hostname of the MySQL account that the MySQL server uses to authenticate the current client. -
DATABASE
The MySQLDATABASE()function returns the current database name as a string. -
ICU_VERSION
The MySQLICU_VERSION()function returns the version of the International Components for Unicode (ICU) library used to support regular expression operations. -
LAST_INSERT_ID
The MySQLLAST_INSERT_ID()function returns the value generated by the last insert for the auto-increment column. -
ROLES_GRAPHML
The MySQLROLES_GRAPHML()function returns a string representing the GraphML document of the memory role subgraphs. -
ROW_COUNT
The MySQLROW_COUNT()function returns the number of rows affected by the execution of the last SQL statement. -
SCHEMA
The MySQLSCHEMA()function returns the current database name as a string. -
SESSION_USER
The MySQLSESSION_USER()function returns the username and hostname of the current MySQL account. -
SYSTEM_USER
The MySQLSYSTEM_USER()function returns the username and hostname of the current MySQL account. -
USER
The MySQLUSER()function returns the username and hostname of the current MySQL account. -
VERSION
The MySQLVERSION()return the version of the MySQL server as a string.