> I didn't know that. What *does* it do if you specify a
> string literal that's smaller than the CHAR(20) field, then?
> Pad it with binary zeros?
MySQL returns a properly trimmed string, although it will allocate a
fixed amount of space for the storage. Other databases pad with blank
spaces.
> > One solution I've seen proposed is to allow the programmer to define
> > NULL as an enumeration. Basically "this value can contain
> a *value*, or
> > it can contain one of N specific NULL values that I define".
>
> I assume that this would be done by the database designer
> rather than the programmer! It sounds reasonable enough, but
> possibly overengineering.
A slip of the tongue (fingers) on my part... The DB designer would be
allowed to define the possible meanings of NULL for a column as part of
the schema.
-JF

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.