Home  >  Article  >  Database  >  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?

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
WBOYforward
2023-09-03 17:13:02851browse

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)

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!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete