
在这种情况下,ASCII()函数的输出取决于我们是否将NULL作为字符串提供,还是仅仅提供NULL。以下示例将演示区别−
mysql> SELECT ASCII(null);+-------------+| ASCII(null) |+-------------+| NULL |+-------------+1 row in set (0.00 sec)mysql> SELECT ASCII('null');+---------------+| ASCII('null') |+---------------+| 110 |+---------------+1 row in set (0.00 sec)mysql> Select ASCII(NULL);+-------------+| ASCII(NULL) |+-------------+| NULL |+-------------+1 row in set (0.00 sec)mysql> Select ASCII('NULL');+---------------+| ASCII('NULL') |+---------------+| 78 |+---------------+1 row in set (0.00 sec)
As we can observe from the above result set that when we will provide NULL or null as a string, ASCII() function will return the number code of the first character i.e. number code of N in case of ‘NULL’ and number code of n in case of ‘null’, otherwise when we provide simply NULL then it returns NULL as output.
阿里云-虚拟数字人
阿里云-虚拟数字人是什么? …
2 查看详情
以上就是如果我将NULL提供给MySQL的ASCII()函数,它会返回什么?的详细内容,更多请关注创想鸟其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/239411.html
微信扫一扫
支付宝扫一扫