mysql text类型没有默认值,如果该字段没有值,则该字段是空,即[b]is null[/b]
使用select语句时应注意:(test是表名,description是字段名,类型是text)
[b]select * from test where description = null;[/b] 等价为
[b]select * from test where description = 'null';[/b]
即此时description 值是null才可以取出。
如果description字段没有填入值,是系统设置的,则执行
[b]select * from test where description is null;[/b]即可
使用select语句时应注意:(test是表名,description是字段名,类型是text)
[b]select * from test where description = null;[/b] 等价为
[b]select * from test where description = 'null';[/b]
即此时description 值是null才可以取出。
如果description字段没有填入值,是系统设置的,则执行
[b]select * from test where description is null;[/b]即可