Hi,

so what's the solution buddies, should I remove auto_increment or I should not default 
it. What exactly should I do now. If possible
make changes to the Create syntax which is as follows and highlight the change:

CREATE TABLE employee( id int(11) DEFAULT '0' NOT NULL auto_increment, name 
varchar(30) NOT NULL, PRIMARY KEY (id) );

Pl. note that the database is empty. I've created a database using mysqladmin and now 
when Iam trying to create tables, I was getting
that error. This makes it clear that there is no existance of records as the tables 
are not created yet..

Any suggestions sandesh, philip...

Seshan.



Sandesh Rao wrote:

> ----- Original Message -----
> From: Philip S Tellis <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, January 18, 2000 11:02 PM
> Subject: Re: [ILUG-BOM] Mysql bules
>
> > It would help if you send the contents of the records.  Or atleast the
> > id's.
> >
> > The id may be null
> > The id may be less than an existing id
> >
> The latter is the correct reason . You cannot have / it doesnn't make sense
> to have a default value on a field that is autoincrement .. Its the
> equivalent of a sequence in oracle / sybase wherein the value of the
> sequence is used to populate the primary key of the table which is of course
> unique ( the rdbms implicitly build an index ) on this field. Hence
> autoincrement option will automatically populate the field and  when you do
> not give any value it assumes the default value '0' which overrides the
> metadata in the data dictionary !!
> Regards
> Sandesh
> > The auto_increment may have probelems with you passing it an id because it
> > expects to auto increment it.
> >
> > Philip
> >
> >
> > To subscribe / unsubscribe goto the site www.ilug-bom.org ., click on the
> mailing list button and fill the appropriate information
> > and submit. For any other queries contact the ML maintener
> >
> >
>
> To subscribe / unsubscribe goto the site www.ilug-bom.org ., click on the mailing 
>list button and fill the appropriate information
> and submit. For any other queries contact the ML maintener

To subscribe / unsubscribe goto the site www.ilug-bom.org ., click on the mailing list 
button and fill the appropriate information 
and submit. For any other queries contact the ML maintener

Reply via email to