当前位置:Gxlcms > 数据库问题 > mysql 插入not null 没有default报错(doesn't have a default value)

mysql 插入not null 没有default报错(doesn't have a default value)

时间:2021-07-01 10:21:17 帮助过:25人阅读

2、mysql中的NULL其实是占用空间的,下面是来自于MYSQL官方的解释

“NULL columns require additional space in the row to record whether their values are NULL. For MyISAM tables, each NULL column takes one bit extra, rounded up to the nearest byte.”

空和null查询的条件也是不一样的,所有最好设置not null!

本文出自 “7804265” 博客,请务必保留此出处http://7814265.blog.51cto.com/7804265/1789338

mysql 插入not null 没有default报错(doesn't have a default value)

标签:mysql insert doesn't have a default value

人气教程排行