MySQL 的 0 和 空字符串

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qmqm011/article/details/89488111

今天发现一个问题,MySQL中的 0 和 空字符串(''、' '、'tab符'、'回车符')居然相等,例如:

select 0 = ''; // 1
select 0 = ' '; // 1
select 0 = '	'; // tab符号,结果1

select 0 = '
';            // 回车符,结果1

猜你喜欢

转载自blog.csdn.net/qmqm011/article/details/89488111