MySQL Forums
Forum List  »  Newbie

Re: confused with null/not null, auto_increment, data types and foreign keys
Posted by: Dave Smith
Date: March 29, 2005 07:39AM

I need to post a correction to my last reply.

When I investigated your question about NULL values I did not notice that the data type on the Gender column is CHAR. That makes the explanation much easier. If you declare a column as CHAR or VARCHAR and NOT NULL, MySQL assigns a default value of an empty string to this column (''). Therefore, if you omit this column it will get the default value of an empty string.

Sorry for the earlier confusion.



Dave Smith

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

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.