[thelist] MySQL data types
noah
noah at tookish.net
Wed Jan 16 16:28:15 CST 2002
Sorry if this is a stupid question.
I've been using tinyint in MySQL tables in order to build relationships
between tables (i.e., to normalize).
The problem I've just encountered is that even if the default for a tinyint
column is set to be null, if a record is entered without information for
that column, the value is set to 0 (i.e., it isn't null), which causes
problems when extracting data from the database.
I'm surprised I haven't run into this before, but this is the first time
it's gotten in my way. Is there any way of dealing with this other than
changing the data type to char, or something like that? I've searched the
MySQL manual, but I can't find anything relating to this (probably just
because I can't get the right search phrase).
And so that I don't have to bug people with questions like this in the
future, can anyone recommend a good, thorough MySQL book?
Thanks,
Noah
More information about the thelist
mailing list