Technology · Reference dataset
MySQL Advanced Functions
MySQL conversion, flow control and information functions with a description, the documented syntax, a documented example with its result, and a link to the MySQL Reference Manual.
Download options
Every record
All 19 records · Last changed November 15, 2026 · Select a column heading to sort.
| Function | Description | Syntax | Example | Result | Doc url |
|---|---|---|---|---|---|
| BIN | Returns a binary representation of a number | BIN(N) | SELECT BIN(12); | 1100 | https://dev.mysql.com/doc/refman/8.4/en/string-functions.html |
| BINARY | Converts a value to a binary string | BINARY expr | https://dev.mysql.com/doc/refman/8.4/en/cast-functions.html | ||
| CASE | Goes through conditions and return a value when the first condition is met | CASE value WHEN compare_value THEN result [WHEN compare_value THEN result ...] [ELSE result] END | SELECT CASE 1 WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE 'more' END; | one | https://dev.mysql.com/doc/refman/8.4/en/flow-control-functions.html |
| CAST | Converts a value (of any type) into a specified datatype | CAST(expr AS type [ARRAY]) | https://dev.mysql.com/doc/refman/8.4/en/cast-functions.html | ||
| COALESCE | Returns the first non-null value in a list | COALESCE(value,...) | SELECT COALESCE(NULL,1); | 1 | https://dev.mysql.com/doc/refman/8.4/en/comparison-operators.html |
| CONNECTION_ID | Returns the unique connection ID for the current connection | CONNECTION_ID() | SELECT CONNECTION_ID(); | 23786 | https://dev.mysql.com/doc/refman/8.4/en/information-functions.html |
| CONV | Converts a number from one numeric base system to another | CONV(N,from_base,to_base) | SELECT CONV('a',16,2); | 1010 | https://dev.mysql.com/doc/refman/8.4/en/mathematical-functions.html |
| CONVERT | Converts a value into the specified datatype or character set | CONVERT(expr USING transcoding_name) | https://dev.mysql.com/doc/refman/8.4/en/cast-functions.html | ||
| CURRENT_USER | Returns the user name and host name for the MySQL account that the server used to authenticate the current client | CURRENT_USER, CURRENT_USER() | https://dev.mysql.com/doc/refman/8.4/en/information-functions.html | ||
| DATABASE | Returns the name of the current database | DATABASE() | SELECT DATABASE(); | test | https://dev.mysql.com/doc/refman/8.4/en/information-functions.html |
| IF | Returns a value if a condition is TRUE, or another value if a condition is FALSE | IF(expr1,expr2,expr3) | SELECT IF(1>2,2,3); | 3 | https://dev.mysql.com/doc/refman/8.4/en/flow-control-functions.html |
| IFNULL | Return a specified value if the expression is NULL, otherwise return the expression | IFNULL(expr1,expr2) | SELECT IFNULL(1,0); | 1 | https://dev.mysql.com/doc/refman/8.4/en/flow-control-functions.html |
| ISNULL | Returns 1 or 0 depending on whether an expression is NULL | ISNULL(expr) | SELECT ISNULL(1+1); | 0 | https://dev.mysql.com/doc/refman/8.4/en/comparison-operators.html |
| LAST_INSERT_ID | Returns the AUTO_INCREMENT id of the last row that has been inserted or updated in a table | LAST_INSERT_ID() | SELECT LAST_INSERT_ID(); | 195 | https://dev.mysql.com/doc/refman/8.4/en/information-functions.html |
| NULLIF | Compares two expressions and returns NULL if they are equal. Otherwise, the first expression is returned | NULLIF(expr1,expr2) | SELECT NULLIF(1,1); | NULL | https://dev.mysql.com/doc/refman/8.4/en/flow-control-functions.html |
| SESSION_USER | Returns the current MySQL user name and host name | SESSION_USER() | https://dev.mysql.com/doc/refman/8.4/en/information-functions.html | ||
| SYSTEM_USER | Returns the current MySQL user name and host name | SYSTEM_USER() | https://dev.mysql.com/doc/refman/8.4/en/information-functions.html | ||
| USER | Returns the current MySQL user name and host name | USER() | SELECT USER(); | davida@localhost | https://dev.mysql.com/doc/refman/8.4/en/information-functions.html |
| VERSION | Returns the current version of the MySQL database | VERSION() | SELECT VERSION(); | 8.4.2-standard | https://dev.mysql.com/doc/refman/8.4/en/information-functions.html |
Open this data in a free tool: CSV to JSON · JSON formatter · SQL INSERT generator · CSV to XML
CSV / JSON / XML
Put this data to work.
All 19 records are available without a pass, within the free request limits.
- CSV for spreadsheets and lookup tables
- JSON for apps and data analysis
- XML for imports and integrations
Commercial use is allowed, free or paid.
Downloaded a CSV? Convert CSV to JSON, generate SQL inserts, remove duplicate lines, or sort a list with the free tools.
Scope and sources
Last checked against sources: October 15, 2026.
Last changed: November 15, 2026. This is when we last changed the data or its description. It doesn’t mean the data runs up to that date.
MySQL Advanced Functions has 19 records and 6 fields: Function, Description, Syntax, Example, Result, Doc url.
A complete download includes all 19 records currently held in this dataset. Check the description and sources to decide whether its scope fits your project.
Use this dataset through the API
GET https://mysafeinfo.com/api/data/mysqladvancedfunctions
Choose a format, sort, or request fewer rows. A pass key gives access to the complete dataset. See the examples and parameters.