Re: insert: auto increment field

2004-01-05 Thread Tobias Asplund
This bug was fixed to 4.0.17, it happened when you inserted a negative value manually into an auto_increment column for more info see: http://bugs.mysql.com/bug.php?id=1366 On Mon, 5 Jan 2004, Donald Henson wrote: > Please post your table schema. As to why rather than zero, I'll > have to def

Re: insert: auto increment field

2004-01-05 Thread Donald Henson
2147483647' for key 1. > > Why id (primaty , and auto_increment) start from 2147483647 and not from 0 > or 1 > > Thanks > > > >From: Donald Henson <[EMAIL PROTECTED]> > >To: MySQL List <[EMAIL PROTECTED]> > >Subject: Re: insert: auto incr

Re: insert: auto increment field

2004-01-04 Thread Daniel Kasak
Mike Mapsnac wrote: Thanks. Just for curiosity. Why "truncate" was necessary in my case? I just create a table and try to insert some values. Truncate is necessary because MySQL keeps track of autoincrement values for each table. Simply deleting a record ( or all records ) has no effect on the

Re: insert: auto increment field

2004-01-04 Thread Mike Mapsnac
Thanks. Just for curiosity. Why "truncate" was necessary in my case? I just create a table and try to insert some values. From: Daniel Kasak <[EMAIL PROTECTED]> To: Mike Mapsnac <[EMAIL PROTECTED]>, [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: insert: aut

Re: insert: auto increment field

2004-01-04 Thread Daniel Kasak
Mike Mapsnac wrote: It solved the problem. But what truncate does? Just deletes the rows? It's the same as doing: drop table create table ( schema from dropped table above ) -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T

Re: insert: auto increment field

2004-01-04 Thread Mike Mapsnac
It solved the problem. But what truncate does? Just deletes the rows? From: Daniel Kasak <[EMAIL PROTECTED]> To: Larry Brown <[EMAIL PROTECTED]>,Mike Mapsnac <[EMAIL PROTECTED]>, MySQL List <[EMAIL PROTECTED]> Subject: Re: insert: auto increment field Date: M

Re: insert: auto increment field

2004-01-04 Thread Daniel Kasak
Larry Brown wrote: Is this a test db? If so go ahead and drop your records so there are none in there and start entering them and checking their id as you do. After dropping all records it should start back at 1 and increment forward. I don't know how the index went up to max for that field. P

RE: insert: auto increment field

2004-01-04 Thread Mike Mapsnac
ECTED]>,"MySQL List" <[EMAIL PROTECTED]> Subject: RE: insert: auto increment field Date: Sun, 4 Jan 2004 19:09:59 -0500 Is this a test db? If so go ahead and drop your records so there are none in there and start entering them and checking their id as you do. After dropping all r

RE: insert: auto increment field

2004-01-04 Thread Larry Brown
D] Subject: Re: insert: auto increment field I use both metods and they works But when I make another insert I receive a message ERROR: 1062 Duplicate entry '2147483647' for key 1. Why id (primaty , and auto_increment) start from 2147483647 and not from 0 or 1 Thanks >From

Re: insert: auto increment field

2004-01-04 Thread Mike Mapsnac
SQL List <[EMAIL PROTECTED]> Subject: Re: insert: auto increment field Date: Sun, 04 Jan 2004 08:44:56 -0700 On Sun, 2004-01-04 at 08:09, Mike Mapsnac wrote: > I have table with 7 fields. First field is id (auto increment). As I > understand the value should start from 0 and next value will

Re: insert: auto increment field

2004-01-04 Thread Donald Henson
; I just tried.. Same problem with > "Duplicate Entry" > > > >From: Donald Henson <[EMAIL PROTECTED]> > >To: MySQL List <[EMAIL PROTECTED]> > >Subject: Re: insert: auto increment field > >Date: Sun, 04 Jan 2004 08:44:56 -0700 > > > &

RE: insert: auto increment field

2004-01-04 Thread Larry Brown
I like naming the fields... insert into product ( NumUsers,DataConnect,Type,NumRouters,NumSwitches,AvgServiceCallsWk ) values ( '456789','t1','new',2,2,10 ) I use php on a large web app that from time to time I have to add a field to a table. If I use the above syntax instead of w/o field names,

Re: insert: auto increment field

2004-01-04 Thread Donald Henson
On Sun, 2004-01-04 at 08:09, Mike Mapsnac wrote: > I have table with 7 fields. First field is id (auto increment). As I > understand the value should start from 0 and next value will auto > increment. > > And I shouldn't add insert the value. So the insert > statemens below gives me an error. E

Re: insert: auto increment field

2004-01-04 Thread Steve Folly
On 4 Jan 2004, at 15:09, Mike Mapsnac wrote: I have table with 7 fields. First field is id (auto increment). As I understand the value should start from 0 and next value will auto increment. And I shouldn't add insert the value. So the insert statemens below gives me an error. ERROR 1136:Colum