MENU
Database Information
VERSION() returns the MySQL server version.DATABASE() or SCHEMA() returns the current database name.
CONNECTION_ID() returns the ID for the connection.
USER(), SESSION_USER(), or SYSTEM_USER() returns the current username and hostname.
CURRENT_USER, or CURRENT_USER() returns the username and hostname combination used to authenticate the current client.
LAST_INSERT_ID() returns the first generated value for an AUTO_INCREMENT column during the last INSERT operation.
ROW_COUNT() returns the number of affected rows during the last operation.
FOUND_ROWS() returns the number of rows returned without the LIMIT clause.
To use this function, include the SQL_CALC_FOUND_ROWS option in the SELECT statement:
> SELECT SQL_CALC_FOUND_ROWS *
FROM tbl LIMIT 10;
> SELECT FOUND_ROWS();CHARSET(str) returns the character set of str.
COLLATION(str) returns the collation of str.
COERCIBILITY(str) returns the collation coercibility of str.
BENCHMARK(count, expr) executes expr count times. The returned value is always zero, but the query execution times may be reported elsewhere.