Thread: default '0'
View Single Post

   
  #4 (permalink)  
Old 02-28-2008, 07:34 AM
Jerry Stuckle
 
Posts: n/a
Default Re: default '0'

bruno - bdf wrote:
> hello
> I try to create a table with this statment
> CREATE TABLE referants (
> id int(10) DEFAULT '0' NOT NULL auto_increment,
> referant char(200) NOT NULL,
> hits int(10) DEFAULT '0' NOT NULL,
> UNIQUE id (id)
> );
>
> but MySQL return a error message
> #1067 - Invalid default value for 'id'
>
> and because I'm a beginner I don't know how to avoid this error
>
> thanks for your help
>
> bruno
>
>
>


You don't use a default value for an auth_increment column.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote