Tony Foiani writes:
 > >>>>> "Hans-J" == Hans-J Krause <[EMAIL PROTECTED]> writes:
 > 
 > Hans-J> A database *never* should accept an insert of an empty string
 > Hans-J> in a not null column - otherwise what for should a
 > Hans-J> not-null-check to be set? 
 > 
 > If you said "Oracle database", I'd agree.  (And, given the rest of
 > your reply, you're obviously thinking about Oracle databases.)
 > However, it's entirely reasonable for a database to distinguish
 > between zero-length strings, and true nulls -- just as Perl does (''
 > is not the same as undef!)

I believe that SQL-92 mandates that a non-null string be at least one
character in length.

Hence trying to store '' will result in ' ' being stored in the DB
(for varchar columns - fixed length columns will pad with spaces to
the appropriate width).

Certainly Sybase (and I presume MS-SQL) behaves this way.

Michael
-- 
Michael Peppler - Data Migrations Inc. - [EMAIL PROTECTED]
http://www.mbay.net/~mpeppler - [EMAIL PROTECTED]
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: [EMAIL PROTECTED]

Reply via email to