MySQL Forums
Forum List  »  Newbie

Re: Does this not look correct?
Posted by: Felix Geerinckx
Date: June 20, 2005 01:16AM

Ryan Nyquist wrote:

> CREATE TABLE adminlog(
>
> adminlogid int( 10 ) unsigned DEFAULT '0' NOT NULL AUTO_INCREMENT ,
> userid int( 10 ) unsigned DEFAULT '0' NOT NULL ,
> dateline int( 10 ) unsigned DEFAULT '0' NOT NULL,
> script char( 20 ) NOT NULL ,
> ACTION char( 20 ) NOT NULL ,
> extrainfo char( 200 ) NOT NULL ,
> ipaddress VARCHAR( 15 ) NOT NULL ,
> PRIMARY KEY ( adminlogid )
> )

> Invalid default value for 'adminlogid'

From: http://dev.mysql.com/doc/mysql/en/create-table.html:

"Note: There can be only one AUTO_INCREMENT column per table, it must be indexed, and it cannot have a DEFAULT value."

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject
Written By
Posted
Re: Does this not look correct?
June 20, 2005 01:16AM


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.