MySQL Forums
Forum List  »  Docs

Re: hi
Posted by: Stefan Hinz
Date: March 17, 2009 01:54AM

You can avoid error 1067 by assigning valid default values to your columns. Look at this example:

mysql> create table tbl_a (i int default 'abcde');
ERROR 1067 (42000): Invalid default value for 'i'
Warning (Code 1366): Incorrect integer value: 'abcde' for column 'i' at row 1
Error (Code 1067): Invalid default value for 'i'

'abcde' isn't a valid value for integer columns, so when trying to assign that string as a default value you get an error. This is explained here:

http://dev.mysql.com/doc/refman/5.1/en/error-messages-server.html

Stefan Hinz, MySQL Documentation, Berlin, Germany

Options: ReplyQuote


Subject
Views
Written By
Posted
hi
5181
February 20, 2009 06:59PM
Re: hi
4122
March 17, 2009 01:54AM
3612
May 20, 2009 07:53AM


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.