mysql int类型字段插入空字符串时自动转为0 如果不想转的话可以修改配置文件 修改 my.ini 文件. # Set the SQL mode to strictsql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION” 改为: # Set the SQL mode to strictsql-mode=”NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”
create table testTable ( id number, name ) ) select * from testTable ,'user1') ,'') ,null) select count(id) from testTable t where t.name='' select count(id) from testTable t where t.name is null or t.name!='' select id,nvl(name,'null') from testTabl