Home > Database > Mysql Tutorial > body text

Is there a lower and upper limit for cardinality in the MySQL CONV() function? What happens if the base provided in the CONV() function exceeds the limit?

WBOY
Release: 2023-09-03 17:13:02
forward
856 people have browsed it

MySQL CONV() 函数中的基数有下限和上限吗?如果 CONV() 函数中提供的基数超出限制会发生什么?

The base must be greater than 2 and less than 36, that is, the lower limit of the base is 2 and the upper limit is 36. It works for from_base and to_base values. If the value we provide exceeds the limit of the base, then MySQL will return NULL as output. The following example will demonstrate it -

Example

mysql> Select CONV(10,10,38);

+----------------+
| CONV(10,10,38) |
+----------------+
| NULL           |
+----------------+

1 row in set (0.00 sec)

mysql> Select CONV(10,72,2);

+---------------+
| CONV(10,72,2) |
+---------------+
| NULL          |
+---------------+

1 row in set (0.00 sec)

mysql> Select CONV(10,10,1);

+---------------+
| CONV(10,10,1) |
+---------------+
| NULL          |
+---------------+

1 row in set (0.00 sec)
Copy after login

The above is the detailed content of Is there a lower and upper limit for cardinality in the MySQL CONV() function? What happens if the base provided in the CONV() function exceeds the limit?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template