Home > Database > Mysql Tutorial > body text

What will MySQL return if we convert an empty hex value to a number?

王林
Release: 2023-09-13 23:53:02
forward
947 people have browsed it

如果我们将空的十六进制值转换为数字,MySQL 将返回什么?

We know that an empty hex value is a zero-length binary string, so if you add 0 to it, the result will be 0. In other words, we can say that if we convert an empty hexadecimal value to a number, then it produces 0. The following query will make it understand -

mysql> SELECT X''+ 0;
+--------+
| X''+ 0 |
+--------+
| 0      |
+--------+
1 row in set (0.15 sec)
Copy after login

The above is the detailed content of What will MySQL return if we convert an empty hex value to a number?. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!