null
''是空字符 相当于在银行有账号,不过没钱
null是空 相当于在银行账号都没有
null比较需要用 is null 或者 is not null 判断
null遇见运算符 一律返回null =null 或 !=null 等等一律返回null ,并且效率不高,所以建表时候一般都会有not null default '';
mysql> select goods_name from goods where goods_name is not null limit 3; +--------------------+ | goods_name | +--------------------+ | KD876 | | htcN85原装充电器 | | 诺基亚原装5800耳机 | +--------------------+
3 rows in set (0.00 sec)
mysql> select goods_name from goods where goods_name is null ; Empty set (0.00 sec)
null 遇见运算符 一律返回null
mysql> select goods_name from goods where goods_name=null ; Empty set (0.00 sec)
mysql> select goods_name from goods where goods_name!=null ; Empty set (0.00 sec)
以上就是mysql null和‘ ’的内容,更多相关内容请关注PHP中文网(www.php.cn)!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号