Skip navigation links

MySQL Forums :: General :: Not null field with default value


Advanced Search

Not null field with default value
Posted by: Tom Byars ()
Date: February 08, 2009 02:34PM

If you add a new record to a table and don't supply a value for a not null field that has a default value, why does MySQL raise an exception stating the field cannot be null? Isn't the idea of a default value that you don't have to supply a value? Is the only way to suppress this exception to make the field a not 'not null' field in which case extra storage is set aside for a possible null value despite the fact a null value will never be assigned?

Options: ReplyQuote


Subject Written By Posted
Not null field with default value Tom Byars 02/08/2009 02:34PM
Re: Not null field with default value Jay Alverson 02/08/2009 04:25PM
Re: Not null field with default value Tom Byars 02/08/2009 04:52PM
Re: Not null field with default value Peter Brawley 02/08/2009 04:57PM
Re: Not null field with default value Jay Alverson 02/08/2009 07:50PM
Re: Not null field with default value Tom Byars 02/09/2009 06:55AM
Re: Not null field with default value Tom Byars 02/11/2009 06:25AM
Re: Not null field with default value Jay Alverson 02/09/2009 09:15AM
Re: Not null field with default value Tom Byars 02/10/2009 04:20AM
Re: Not null field with default value Jay Alverson 02/10/2009 07:48AM


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.