- Tags: MySQL
- Categories: Reference, SQL Reference, SQL Resources
Quick Reference
This is a quick reference list of MySQL advanced functions and how they are used to work with databases.
SQL – MySQL BIN() Function
The MySQL BIN() function returns a binary representation of a number, as a string value.
SQL – MySQL BINARY Function
The MySQL BINARY function converts a value to a binary string.
SQL – MySQL CASE Function
The MySQL CASE statement goes through conditions and will stop reading and return a value when the first condition in the list is met.
SQL – MySQL CAST() Function
The MySQL CAST() function converts a value of any type into the specified datatype.
SQL – MySQL COALESCE() Function
The MySQL COALESCE() function returns the first non-null value in a list.
SQL – MySQL CONNECTION_ID() Function
The MySQL CONNECTION_ID() function returns the unique connection ID for the current connection.
SQL – MySQL CONV() Function
The MySQL CONV() function converts a number from one numeric base system to another, and returns the result as a string value.
SQL – MySQL CONVERT() Function
The MySQL CONVERT() function converts a value into the specified datatype or character set.
SQL – MySQL CURRENT_USER() Function
The MySQL CURRENT_USER() function returns the user name and host name for the MySQL account that the server used to authenticate the current client.
SQL – MySQL DATABASE() Function
The MySQL DATABASE() function returns the name of the current database. If there is no current database, this function returns NULL or “”.
SQL – MySQL IF() Function
The MySQL IF() function returns a value if a condition is TRUE, or another value if a condition is FALSE.
SQL – MySQL IFNULL() Function
The MySQL IFNULL() function returns a specified value if the expression is NULL.
SQL – MySQL ISNULL() Function
The MySQL ISNULL() function returns 1 (null) or 0 (not null) depending on whether an expression is NULL.
SQL – MySQL LAST_INSERT_ID() Function
The MySQL LAST_INSERT_ID() function returns the AUTO_INCREMENT id of the last row that has been inserted or updated in a table.
SQL – MySQL NULLIF() Function
The MySQL NULLIF() function compares two expressions and returns NULL if they are equal. Otherwise, the first expression is returned.
SQL – MySQL SESSION_USER() Function
The MySQL SESSION_USER() function returns the current user name and host name for the MySQL connection.
SQL – MySQL SYSTEM_USER() Function
The MySQL SYSTEM_USER() function returns the current user name and host name for the MySQL connection.
SQL – MySQL USER() Function
The MySQL USER() function returns the current user name and host name for the MySQL connection.
SQL – MySQL VERSION() Function
The MySQL VERSION() function returns the current version of the MySQL database, as a string.
We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.
Why 1SMARTchicken?
See More →
Thanks for your support!
SQL Books
All are affiliate links. Thank you for your support!
SQL NOTES:
- Any work being done to modify the structure of a database or delete tables or the the database itself should only be done after making a recent backup
Feedback
If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.