Bruce Momjian wrote:
> Ben-Nes Michael wrote:
>
>>Then Why not set it to NULL
>
> Well, it is not NULL, though, it is ''. They are not the same in
> strings (though for some dbms's they are), so I don't see why we would
> do that for numerics.
>
>>Seems logic as there is nothing between ''
>>
>>What is the solution of other dbs ( oracle, db2 .. ) to:
>>insert into table (num) value (''); ?
>
> I assume they would fail too.
Oracle doesn't fail because it converts an empty string into
NULL. So the insert succeeds if the column lacked a NOT NULL
constraint. But Oracle's treatment of empty strings as NULL *is
insane*. Not sure about DB2...
Mike Mascari
mascarm@mascari.com