【mysql】更新“”空字符串为NULL

mysql中NULL和“”是完全不同的概念,因此出现了“”导致NULL不可查的问题出现,那怎么能将一个字段设置为NULL呢?

update goods_type gt set gt.parent_uid = NULL where gt.uid = '59daba3827e84519a03ba8c413400af1'

这样即可

原文地址:https://www.cnblogs.com/sxdcgaq8080/p/9405416.html