首页 > 数据库技术 > 详细

MySQL,Oracle中空字符串和NULL

时间:2017-09-11 19:28:14      阅读:464      评论:0      收藏:0      [点我收藏+]

Mysql 中空字符串和NULL是不一样的。

Oracle中空字符串就是NULL。

 update User set realname =‘‘ where name = "ff"; -- 在Oracle中不起作用,只有NULL,没有空字符串。

 update User set mobile = null where name = "ff"; --在Mysql中设置mobile为空。

 update User set mobile = "" where name = "ff"; --在Mysql中设置mobile为空字符串。

MySQL,Oracle中空字符串和NULL

原文:http://www.cnblogs.com/fionaa/p/7506249.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!