如果CONV()
函数的任何参数为NULL或为基数提供的值超出限制(即不在2到36之间),MySQL将返回NULL作为输出。以下示例将证明这一点。
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)