Advanced Functions

  1. Overview
  2. MYSQL
  3. Advanced Functions

MySQL BIN() Function

The BIN() function in MySQL returns a binary (base-2) representation of a given number as a string. Syntax BIN(number) Parameters Parameter Description numb ...

MySQL BINARY Function

The BINARY function in MySQL is used to convert a value into a binary string. This function ensures that comparisons or operations on the value are done in a binary (case-sensitive ...

MySQL CURRENT_USER() Function

The CURRENT_USER() function returns the user name and host name for the MySQL account that the server used to authenticate the current client connection. This function is particul ...

MySQL CASE Function

The CASE function in MySQL is used to perform conditional logic in SQL queries. It allows you to execute a series of conditions and return a value when the first true condition is ...

MySQL CAST() Function

The CAST() function in MySQL is used to convert a value from one datatype to another. It allows you to explicitly convert between various data types, such as from CHAR to DATE or f ...

MySQL COALESCE() Function

The COALESCE() function in MySQL returns the first non-NULL value from a list of expressions. This function is often used to provide a default value when NULL values are encountere ...

MySQL CONNECTION_ID() Function

The CONNECTION_ID() function returns the unique connection ID for the current connection to the MySQL server. This ID is useful for identifying the connection in use by a specific ...

MySQL CONV() Function

The CONV() function in MySQL is used to convert a number from one numeric base system to another. The result is returned as a string value. It allows conversion between bases rangi ...

MySQL CONVERT() Function

The CONVERT() function in MySQL is used to convert a value into a specific datatype or character set. It allows conversion of data types such as dates, decimals, and even string en ...

MySQL DATABASE() Function

The DATABASE() function returns the name of the currently selected (default) database in the MySQL session. If there is no database selected (i.e., no database has been chosen usi ...

MySQL IF() Function

The IF() function in MySQL returns one value if a condition is true and another value if the condition is false, acting like an IF-THEN-ELSE statement. Syntax IF(condition, val ...

MySQL IFNULL() Function

The IFNULL() function in MySQL is used to test whether an expression is NULL. If it is NULL, it returns a specified alternative value. Otherwise, it returns the expression itself. ...

MySQL ISNULL() Function

The ISNULL() function in MySQL is used to check if a given expression is NULL. It returns 1 if the expression is NULL, and 0 if the expression is not NULL. Syntax ISNULL(expres ...

MySQL LAST_INSERT_ID() Function

The LAST_INSERT_ID() function in MySQL is used to retrieve the AUTO_INCREMENT value of the last row that was inserted or updated in a table. Syntax LAST_INSERT_ID() or LAST ...

MySQL NULLIF() Function

The NULLIF() function compares two expressions and returns NULL if they are equal. Otherwise, it returns the first expression. Syntax NULLIF(expr1, expr2) Parameter Value ...

MySQL SESSION_USER() Function

The SESSION_USER() function returns the current user name and host name for the MySQL connection. Syntax SESSION_USER() Definition and Usage The SESSION_USER() function ...

MySQL SYSTEM_USER() Function

The SYSTEM_USER() function returns the current user name and host name for the MySQL connection. Syntax SYSTEM_USER() Definition and Usage The SYSTEM_USER() function pr ...

MySQL USER() Function

The USER() function returns the current user name and host name for the MySQL connection. Syntax USER() Definition and Usage The USER() function returns the user name a ...

MySQL VERSION() Function

The VERSION() function returns the current version of the MySQL database as a string. Syntax VERSION() Definition and Usage The VERSION() function is used to retrieve t ...