What happens if a NULL argument is provided in MySQL CONV() function?

MySQLMySQLi Database

MySQL will return NULL as the output if any of the argument of CONV() function is NULL or if the value provided for the base is out of limit(i.e. not between minimum 2 and maximum 36). Following examples would demonstrate it.

Example

mysql> Select CONV(10,NULL,2);
+-----------------+
| CONV(10, NULL,2)|
+-----------------+
| NULL            |
+-----------------+
1 row in set (0.00 sec)

mysql> Select CONV(10,10, NULL);
+------------------+
| CONV(10,10, NULL)|
+------------------+
| NULL             |
+------------------+
1 row in set (0.00 sec)

mysql> Select CONV(NULL,10,2);
+-----------------+
| CONV(null,10,2) |
+-----------------+
| NULL            |
+-----------------+
1 row in set (0.00 sec)
raja
Published on 20-Feb-2018 11:47:50
Advertisements