MySQL Functions
MySQL Functions
❮ ❯
This reference contains string, numeric, date, and some advanced functions in
MySQL.
ADVERTISEMENT
LAST_DAY Extracts the last day of the month for a given date
QUARTER Returns the quarter of the year for a given date value
YEARWEEK Returns the year and week number for a given date
MySQL Advanced Functions
Function Description
CASE Goes through conditions and return a value when the first
condition is met
CURRENT_USER Returns the user name and host name for the MySQL account
that the server used to authenticate the current client
LAST_INSERT_ID Returns the AUTO_INCREMENT id of the last row that has been
inserted or updated in a table
NULLIF Compares two expressions and returns NULL if they are equal.
Otherwise, the first expression is returned
SESSION_USER Returns the current MySQL user name and host name
SYSTEM_USER Returns the current MySQL user name and host name
USER Returns the current MySQL user name and host name