It's weird that sybase will convert empty string into ' ' (note: not empty but just a whitespace).
So if you want to insert a null into a row, you should do like this:
insert tabe xxx values (..., null, ...)
That's, include a null value in your sql query, or you should not metion that column name in the sql, it defaultly will insert a null.
本文介绍了在使用Sybase数据库时如何正确处理空值和空字符串的问题。当需要插入NULL值而不是空白字符串时,应直接在SQL语句中使用NULL关键字,或者在插入语句中省略该字段。
1312

被折叠的 条评论
为什么被折叠?



