In the last episode (Oct 11), Otis Gospodnetic said:
> Hello,
>
> If I set no DEFAULT for a varchar column and make it NOT NULL, what should
> happen if I try inserting empty ('') value in that column?
>
> I expected an error, but when I run this:
>
> INSERT INTO user_info
> (user_id, user_pass, user_pass_hint, user_fname, user_lname,
> user_email, user_phone, user_fax, user_addr_1, user_addr_2,
> user_city, user_state, user_zip, user_country_code)
> VALUES ('', '', '', '', '', '', '', '', '', '', '', '', '', '')
>
> The DB took it without an error! Shouldn't I get an error from a DB
> telling me that I'm inserting a '' value in a column that is varchar
> and NOT NULL?
'' is a zero-length string. NULL is the absence of a string
altogether. They are two different things. Oracle treats them as
equal, but they acknowledge that this isn't right and will treat them
differently in a later version.
--
Dan Nelson
dnelson@stripped