>Description:
Say we have column named id int NOT NULL AUTO_INCREMENT
Say we have record, where id=0 (why not?)
Say we used mysqldump to backup our table.
One day we tryied to restore our table, but we will never get record
where id=0 back, becouse rule for AUTO_INCREMENT rows will ap
thanks.
i'll start it with the value i need. it increments after that ;)
Heikki Tuuri wrote:
> Joe,
>
> sorry, I did not know AUTO_INCREMENT=... clause does not work with InnoDB. I
> will look if it is easy to fix.
>
> A workaround is that you insert the first row wh
FYI: im using mysql 3.23.44
auto_increment doesn't seem to work with InnoDB. i've tried to create a
table with:
create table some_table (
uid INT UNSIGNED AUTO_INCREMENT NOT NULL DEFAULT 1500,
user VARCHAR(100) NOT NULL,
PRIMARY KEY (uid),
UNIQUE KEY (uid)
) TYPE=INN
> Hi,
>
> Is it possible to drop an auto_increment column index or primary key to
> boost performance for bulk inserts? It seems mysql requires auto_increment
> columns to be a key at all times.
>
> Here is the error message:
>
> Incorrect table definition; There can
Maybe you could try insert delayed
- Original Message -
From: "Wilfred Li, Ph.D." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 15, 2001 9:17 AM
Subject: dropping auto_increment PK/Index
> Hi,
>
> Is it possible to drop an auto_in
Hi,
Is it possible to drop an auto_increment column index or primary key to
boost performance for bulk inserts? It seems mysql requires auto_increment
columns to be a key at all times.
Here is the error message:
Incorrect table definition; There can only be one auto column and it must
be
Maciek,
>Hi,
>
>Is this correct for MySQL to increment the auto_increment counter if the
>INSERT query fails? For example:
>
>mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT
>NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB;
>Query OK, 0 rows a
Maciek,
>Hi,
>
>Is this correct for MySQL to increment the auto_increment counter if the
>INSERT query fails? For example:
>
>mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT
>NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB;
>Query OK, 0 rows a
Maciek,
>Hi,
>
>Is this correct for MySQL to increment the auto_increment counter if the
>INSERT query fails? For example:
>
>mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT
>NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB;
>Query OK, 0 rows a
Maciek,
>Hi,
>
>Is this correct for MySQL to increment the auto_increment counter if the
>INSERT query fails? For example:
>
>mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT
>NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB;
>Query OK, 0 rows a
Maciek,
>Hi,
>
>Is this correct for MySQL to increment the auto_increment counter if the
>INSERT query fails? For example:
>
>mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT
>NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB;
>Query OK, 0 rows a
Maciek,
>Hi,
>
>Is this correct for MySQL to increment the auto_increment counter if the
>INSERT query fails? For example:
>
>mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT
>NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB;
>Query OK, 0 rows a
Hi,
Is this correct for MySQL to increment the auto_increment counter if the
INSERT query fails? For example:
mysql> CREATE TABLE test ( i INT NOT NULL AUTO_INCREMENT, c CHAR(16) NOT
NULL, PRIMARY KEY(i), UNIQUE(c)) type=InnoDB;
Query OK, 0 rows affected (0.25 sec)
mysql> INSERT INT
> > Disclaimer: SQL/database newbie here.
>
> Nothing wrong with being a newbie :-)
Thanks for the help.
> > Let's say I have a table of authors with columns for last name and first
> > name. Is there any general guideline re using a separate
> integer for the
> > primary key as opposed to a co
> That's not really true. You can use an auto_increment field as the primary
> key and create a seperate UNIQUE index that combines both the firstname and
> lastname fields that will be inforced for inserts.
> Usually its easier to work with integers as primary keys, espe
"
> > authors that are different people. I only want to associate an author name
> > with a book.
>
> The column you seek is an integer column with the auto_increment flag, e.g.:
>
> CREATE TABLE authors (
> last_name char(64) DEFAULT '' NOT NULL,
> f
> Disclaimer: SQL/database newbie here.
Nothing wrong with being a newbie :-)
> Let's say I have a table of authors with columns for last name and first
> name. Is there any general guideline re using a separate integer for the
> primary key as opposed to a combination of the last and first nam
ame
> with a book.
The column you seek is an integer column with the auto_increment flag, e.g.:
CREATE TABLE authors (
last_name char(64) DEFAULT '' NOT NULL,
first_name char(64) DEFAULT '' NOT NULL,
author_idx integer NOT NULL AUTO_INCREMENT,
PRIMARY KEY( author_idx ),
That's not really true. You can use an auto_increment field as the primary
key and create a seperate UNIQUE index that combines both the firstname and
lastname fields that will be inforced for inserts.
Usually its easier to work with integers as primary keys, especially when
you reference
Disclaimer: SQL/database newbie here.
Let's say I have a table of authors with columns for last name and first
name. Is there any general guideline re using a separate integer for the
primary key as opposed to a combination of the last and first names as the
key? I ask because by using the name
Hi.
The behaviour of auto_increment is strange or it's a bug.
All is, what are you described above.
delete from t1;
this command deletes all records and auto_increment will be 1, but if
i use mysql-max (3.23.43 with innoDB - all in my.ini is set to handle
innoDB)
delete from t1;
l
HI everybody.
I saw, when i delete all records from the table where id
is primary key and auto_increment, the first number for id is'nt 1 but next
in a row (the last was 5 the next will be 6).
Can i change this behavior ? Mybe in file my.ini ?
The goal is, that when i delete all records
> Chris Bolt wrote:
>
> > Only with ISAM tables which reuse deleted auto_increment numbers. MyISAM
> > tables will give you "Duplicate entry" errors if you hit the maximum.
>
> I hadn't realized this and tested it out in MySQL 3.23.43, but in my tests
&
> > Only with ISAM tables which reuse deleted auto_increment numbers. MyISAM
> > tables will give you "Duplicate entry" errors if you hit the maximum.
>
> I hadn't realized this and tested it out in MySQL 3.23.43, but in my tests
> ISAM tables also returned
Chris Bolt wrote:
> Only with ISAM tables which reuse deleted auto_increment numbers. MyISAM
> tables will give you "Duplicate entry" errors if you hit the maximum.
I hadn't realized this and tested it out in MySQL 3.23.43, but in my tests
ISAM tables also returned a &q
In the last episode (Oct 27), D Campbell said:
> quickie: can auto_increment wrap?
>
> I have a system that uses mysql for temporary storage of data. The
> records are kept unique in the usual lazy man's way of having an
> auto_increment ID field.
>
> A large num
> quickie: can auto_increment wrap?
Only with ISAM tables which reuse deleted auto_increment numbers. MyISAM
tables will give you "Duplicate entry" errors if you hit the maximum.
-
Before posting, please c
quickie: can auto_increment wrap?
I have a system that uses mysql for temporary storage of
data. The records are kept unique in the usual lazy man's
way of having an auto_increment ID field.
A large number of records come and go from this database.
At SOME point in the future, the in
Hi,
There is no AUTO_INCREMENT() function. AUTO_INCREMENT is a
directive that you specify when you create a table.
Try this:
CREATE TABLE test
(
Id int unsigned not null auto_increment,
primary key (id)
);
INSERT INTO test VALUES (NULL), (NULL), (NULL), (NULL), (NULL);
SELECT * FROM
On 23-Sep-2001 Neil Silvester wrote:
>
> How do I convert (or create from scratch) a table who's AUTO_INCREMENT
> column would be a, b, c, d, e and so forth up to z?
> At the moment I am using an INT column 1, 2, 3, 4, etc, but I would really
> be able to make good use i
Neil Silvester writes:
> How do I convert (or create from scratch) a table who's AUTO_INCREMENT
> column would be a, b, c, d, e and so forth up to z?
> At the moment I am using an INT column 1, 2, 3, 4, etc, but I would really
> be able to make good use in my queries i
How do I convert (or create from scratch) a table who's AUTO_INCREMENT
column would be a, b, c, d, e and so forth up to z?
At the moment I am using an INT column 1, 2, 3, 4, etc, but I would really
be able to make good use in my queries if this column was alphabetical
instead.
Thanks.
At 3:15 PM -0400 9/17/01, Jay Fesco wrote:
> > Can someone tell me how to reset a column's auto_increment starting point
>> back to 0 in mysql ?
>>
>> Thanks
>>
>> Paul
>>
>According to Paul DuBois on page 169 of MySQL by New Riders (whi
> Can someone tell me how to reset a column's auto_increment starting point
> back to 0 in mysql ?
>
> Thanks
>
> Paul
>
According to Paul DuBois on page 169 of MySQL by New Riders (which you
should buy):
ALTER TABLE t
DROP i,
ADD i INT UNSIGNED AUTO_INCR
Can someone tell me how to reset a column's auto_increment starting point
back to 0 in mysql ?
Thanks
Paul
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysq
Hello, I have a mysql database with a table called "cust". The primary key column
custid is of type int and has the auto_increment feature which has been working
perfectly for months. The auto_increment feature set numbers as high as 21700.But
suddenly, it started over, setti
On Fri, Aug 31, 2001 at 04:07:14PM -0500, Tony Bibbs wrote:
>
> can anyone tell me why an auto increment field would jump from 231
> to something large like 883607 and then give me failure on future
> insertions because of a duplicate key?
Sounds like a corrupt index.
> I'm running mysql 3.23.39
can anyone tell me why an auto increment field would jump from 231 to
something large like 883607 and then give me failure on future insertions
because of a duplicate key?
I'm running mysql 3.23.39 on RH 7.1
--Tony
-
Before po
IL PROTECTED]>
Sent: Wednesday, August 29, 2001 11:09 PM
Subject: Changing auto_increment field in mysql to start at 1000
>
> I tried this:
>
> update customers set row_id='1000' where row_id='1';
>
> but that only changed the one field in the table and the other o
impossible due to uniqueness
constraints.
What auto_increment does is this: "When you insert a value of NULL
(recommended) or 0 into an AUTO_INCREMENT column, the column is set
to value+1, where value is the largest value for the column currently
in the table."
//C
--
Carl Troein - Cí
I tried this:
update customers set row_id='1000' where row_id='1';
but that only changed the one field in the table and the other ones stayed
the same =(.
Could someone please tell me the correct way to do this
Armando
-
This would give you a list of all users that have entered things more than
once; However, it would not give you all the rows that are duplicated.
SELECT Count(User) from mail_form2 GROUP BY User HAVING Count(User) > 1
Hope this helps!
Daniel Von Fange
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
y for my tables:
>
> "id int(10) unsigned NOT NULL auto_increment,"
>
> now, when i have to clean up items in my tables, like when users have
> sent off a .html form multiple times and i want to delete duplicate
> submissions, how can i quickly & easily update
hi,
i have 2 questions that i badly need answered. i use phpmyadmin, but
any answers containing SQL syntax should work in this app...
1)
this should be simple but i don't know it. i use the following mysql
table field as the Key for my tables:
"id int(10) unsigned NOT NULL auto
7; for key 1
Field def: record_id SMALLINT UNSIGNED AUTO_INCREMENT PRIMARY KEY ;
There is no duplicate record_id '102', but I'm concerned that, since
the data in the text file is not in record_id order, that the
AUTO_INCREMENT option I've assigned to record_id may be causing the
p
ot;Andrew Schmidt" <[EMAIL PROTECTED]>
>Cc: <[EMAIL PROTECTED]>
>Sent: Thursday, August 16, 2001 12:50 PM
>Subject: Re: auto_increment vs. heap tables
>
>
> > Uh oh... Please NO. I want the standard _FAST_ auto_increment, not this.
> > "select max(id
#x27;" <[EMAIL PROTECTED]>
Sent: Thursday, August 16, 2001 1:02 PM
Subject: RE: auto_increment vs. heap tables
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Except, if you have a table like so:
>
> ++-+
> | id | num |
> ++-+
> |
ct the
max(sess_id).
well anyway, sorry I couldn't help more.
thanks,
-- Andrew
- Original Message -
From: "Leos Bitto" <[EMAIL PROTECTED]>
To: "Andrew Schmidt" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, August 16, 2001 12:50 PM
Uh oh... Please NO. I want the standard _FAST_ auto_increment, not this.
"select max(id) from table x" is terribly inefficient. And the table
is locked during this operation... That's just not acceptable for me.
Anyway, thanks for the response. It was the second one.
Leos
On T
id recieved from the select.
so doing it manually with heap tables seems quite feasable just a little
extra work.
thanks,
-- Andrew
- Original Message -
From: "Leos Bitto" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 14, 2001 6:05 AM
Subject: a
e MySQL manual (applause
> > here, please!) I know that auto_increment cannot be used there.
> > This hurts me a lot, and given that MySQL doesn't support sequences,
> > it nearly prohibits the usage of heap tables in my application.
>
> You do know that HEAP table
n MySQL. Because I have read the MySQL manual (applause
> here, please!) I know that auto_increment cannot be used there.
> This hurts me a lot, and given that MySQL doesn't support sequences,
> it nearly prohibits the usage of heap tables in my application.
You do know that HEAP ta
Hello,
I am currently changing a simple PHP4-based application from PostgreSQL
7.1 to MySQL 3.23. I have some tables in the database which I would like
to create as TYPE=HEAP in MySQL. Because I have read the MySQL manual
(applause here, please!) I know that auto_increment cannot be used there
Date |Tue, 07 Aug 2001 13:59:05 -0500
>From |[EMAIL PROTECTED]
Hello!
M> Hi All,
M> Not sure if this is a bug or just a standard behavior of a auto_increment
M> zerofill column.
M> I have a column in a MySQL database table assigned as such:
M> memid int(8) auto_increment ze
Thanks Paul,
That works fine. :)
>>On Tue, 7 Aug 2001 16:12:16 -0500, Paul DuBois <[EMAIL PROTECTED]> wrote:
>>>Hi All,
>>>
>>>Not sure if this is a bug or just a standard behavior of a auto_increment
>>>zerofill column.
>>>
>
At 1:25 PM -0500 8/7/01, [EMAIL PROTECTED] wrote:
>Hi All,
>
>Not sure if this is a bug or just a standard behavior of a auto_increment
>zerofill column.
>
>I have a column in a MySQL database table assigned as such:
>
>memid int(8) auto_increment zerofill primary key,
&
Hi All,
Not sure if this is a bug or just a standard behavior of a auto_increment
zerofill column.
I have a column in a MySQL database table assigned as such:
memid int(8) auto_increment zerofill primary key,
now when the a new row is inserted in fills the column with the appropriate 0's
Hi All,
Not sure if this is a bug or just a standard behavior of a auto_increment
zerofill column.
I have a column in a MySQL database table assigned as such:
memid int(8) auto_increment zerofill primary key,
now when the a new row is inserted in fills the column with the appropriate 0's
I prefer to use Auto_Increment for ease of use. In addition, I don't think
that MySQL supports sequences outright (like you may be used to with
Oracle). There are some workarounds availabe within the MySQL manual, do a
search with "sequences".
Goo
Does anybody know which approach is better with mysql:
Create sequences for tables or an auto_increment columns???
and why???
Siomara
_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
> Dear Peter,
>
> > Even if i delete the record where id=65535
> > DELETE FROM cust WHERE id=65535
> > AUTO_INCREMENT starts with 65535 and i cant add any more records.
>
> Sad, but true, MySQL "remembers" the biggest number inserted into an
> auto
ay, July 25, 2001 12:15 PM
Subject: Re: AUTO_INCREMENT problem in table
> Dear Peter,
>
> > Even if i delete the record where id=65535
> > DELETE FROM cust WHERE id=65535
> > AUTO_INCREMENT starts with 65535 and i cant add any more records.
>
> Sad, but true, MySQL &qu
Dear Peter,
> Even if i delete the record where id=65535
> DELETE FROM cust WHERE id=65535
> AUTO_INCREMENT starts with 65535 and i cant add any more records.
Sad, but true, MySQL "remembers" the biggest number inserted into an
auto_increment column. If you delete the row in
At 4:47 PM +0200 7/25/01, Peter Wiherkoski wrote:
>Hi, got a problem:
>
>My table (part of it) looks like this:
>CREATE TABLE cust (
>id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
>name CHAR(30) NOT NULL,
>PRIMARY KEY (id)
>);
>
>When i type
>INSERT INTO cust VA
Hi, got a problem:
My table (part of it) looks like this:
CREATE TABLE cust (
id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
);
When i type
INSERT INTO cust VALUES(NULL,"Peter");
the value of id will increase by 1 every time i insert a r
We had this discussion here a couple of days ago. There are
versions of MySQL who behave this way, but it is mostly not
considered the correct way. So you may as well get used to the
idea that an autoincremented field is doomed to increment no
matter what.
> That got me thinking...say you have a
Well David,
Using MyISAM tables, you would get 501 'cos the auto_increment pointer
continues adding and never subtracts, but with ISAM tables, you would
get 500. So take care of what type of table you are using and don't get
bored as I've got.
Best regards,
Wil
o I get
> > a
> > > table like this...
> > > ++
> > > | Edicao |
> > > ++
> > > | 1 |
> > > | 2 |
> > > | 4 |
> >
> > This is not a bug, it's a feature. Assume something like "staf
> > ++
> > | Edicao |
> > ++
> > | 1 |
> > | 2 |
> > | 4 |
>
> This is not a bug, it's a feature. Assume something like "staff number"
> being an auto_increment column. Staff # 1234 gets
This is not a bug, it's a feature. Assume something like "staff number"
being an auto_increment column. Staff # 1234 gets layed off, all the
payments are cancelled, no holidays for # 1234 any more etc. Now, a new
employee gets the "empty" staff number 1234. He will never
OK, I found some...
>From the manual at "MyISAM tables"...
"Internal handling of one AUTO_INCREMENT column. MyISAM will
automatically update this on INSERT/UPDATE. The AUTO_INCREMENT value can
be reset with myisamchk. This will make AUTO_INCREMENT columns faster
(at least 10
> The problem is...if I delete the third entry (Edicao = 3), the next
> entry inserted should be 3, right?! Well it is not! It is 4.
Well, this may be debated. I suffered a lot from the behaviour
you want to have. I considered it bad design ...
An autoincrement field should not serve for counti
aining the maximum value for an AUTO_INCREMENT
> column, the value will be reused with an ISAM, or BDB table but not with a
> MyISAM or InnoDB table. If you delete all rows in the table with DELETE FROM
> table_name (without a WHERE) in AUTOCOMMIT mode, the sequence starts over
> for all
It is not a bug, it is a bug fix. The auto_increment is based on the last
number used. It is not supposed to decrement.
j- k-
On Friday 20 July 2001 11:53, William N. Zanatta wrote:
> Hello guys...
>
> I'm having problem with the auto_increment feature.
> I have
hi.
from the manual:
If you delete the row containing the maximum value for an AUTO_INCREMENT
column, the value will be reused with an ISAM, or BDB table but not with a
MyISAM or InnoDB table. If you delete all rows in the table with DELETE FROM
table_name (without a WHERE) in AUTOCOMMIT mode
Well, it's a feature not a bug, and you are right too. auto_increment
remembers the last value and keeps increasing it, no matter how many
"holes" are created. So when use it, better to create a status column to
change flag as deleted other than real delete it.
"Willi
Hello guys...
I'm having problem with the auto_increment feature.
I have a table like this...
++-+--+-+++
| Field | Type| Null | Key | Default|
d with a number one digit lower than your desired
beginning number. The next record will start where you want it.
- I think you can also use the INSERT_ID = # command in later versions of
MySQL. The next record should auto_increment from the number you specify.
A note of caution ... if you are ins
At 11:03 PM +0200 7/17/01, Alexander Skwar wrote:
>So sprach »Warren van der Merwe« am 2001-07-17 um 22:31:02 +0200 :
>> in my plain language there it is, but the pro's may give a more detailed
>> approach.
>
>Yeah, that's sorta how I understand it as well. Also auto_increments
>BREAK when you
So sprach »Warren van der Merwe« am 2001-07-17 um 22:31:02 +0200 :
> in my plain language there it is, but the pro's may give a more detailed
> approach.
Yeah, that's sorta how I understand it as well. Also auto_increments
BREAK when you manually insert a row and set the column with the
auto_inc
der Merwe
Software Director
PRT Trading (Pty) Ltd t/a RedTie
Durban, South Africa
Cell (+27-83) 262-9163
Office (+27-31) 767-0249
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> ]On Behalf
> Of Alexander Skwar
> Sent: 17 July 2001 21:58
&g
Hello.
I've just created a table with a auto_increment column. I then did
ALTER TABLE tbl AUTO_INCREMENT=4711;
Now, when I insert one row into this table, it get's 4711 as the
auto_increment column's value. However, dumping this table with
mysqldump --opt DB tbl
loses the
ke" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, July 12, 2001 5:18
> Subject: auto_increment not incrementing
>
>
> > Hello,
> > When I submit data it will not submit data into
> the
> > database unless I put some kind of num
What error did you get? Did you try using NULL for the id, or leaving the
auto_increment column out of the insert (insert into table (PartNumber, ...,
StatusQtyWorked) values (...))?
> Hello,
> When I submit data it will not submit data into the
> database unless I put some kind of numb
In what way doesn't it work? Works fine for me.
- Original Message -
From: "Mike Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 12, 2001 5:18
Subject: auto_increment not incrementing
> Hello,
> When I submit data it will no
,
DateNextQtyComplete VARCHAR(10) NOT NULL,
StatusQtyWorked VARCHAR(10) NOT NULL,
ID INT(5) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (ID)
);
Does anyone know why the auto_increment doesn't work?
I'm using mysql Ver 8.0 Distrib 3.22.32, for
pc-linux-gnu on i686
Thanks yo
ing an unsigned
>>bigint (0 - 2**64-1)
>>note i said postpone, not eliminate.
>
>Have you done calculations, how long it takes to reuse all id-s? I have
>done :). I bet that auto_increment field will be still young, fresh and
>alive even when this application is already dead
tj marlin wrote:
> you can postpone this problem for a very long time by using an unsigned
> bigint (0 - 2**64-1)
> note i said postpone, not eliminate.
Have you done calculations, how long it takes to reuse all id-s? I have
done :). I bet that auto_increment field will be still you
is really broken.
you can postpone this problem for a very long time by using an unsigned
bigint (0 - 2**64-1)
note i said postpone, not eliminate.
hth
At 11:31 PM 7/7/01 +0100, you wrote:
>Hi
>ANy idea how i can get my auto_increment fields to renumber themselves
>after deletion of r
Thank goodness this is the position. If the capability of
reordering the auto_increment existed, we could potentially
have all of our databases broken by some inadvertant finger trouble.
As you mentioned, there are better ways to handle this perceived
"problem", which appear
Kif wrote:
> Hi
> ANy idea how i can get my auto_increment fields to renumber themselves after
>deletion of records so that they all get re-ordered and run consecutively from 1 to
>whatever without any numbers missing ?
> Please help if you know how to do this
I thin
Hi
ANy idea how i can get my auto_increment fields to renumber themselves after deletion
of records so that they all get re-ordered and run consecutively from 1 to whatever
without any numbers missing ?
Please help if you know how to do this
Thanks
Keith White
rchar(254) default NULL,
comments text,
time varchar(100) default NULL,
rec int(11) NOT NULL auto_increment,
PRIMARY KEY (rec)
) TYPE=MyISAM;
#
# Dumping data for table 'guestbook'
#
-
Before posting, please check:
>I am currently using MySQL to warehouse real-time data, and I have a couple
>of questions regarding AUTO_INCREMENT columns.
>
>OS: Linux/Solaris
>MySQL version: 3.23.33
>Table Types: MYISAM
>
>
>1) The data is only stored for 24hrs. If I do continuous deletes
I am currently using MySQL to warehouse real-time data, and I have a couple
of questions regarding AUTO_INCREMENT columns.
OS: Linux/Solaris
MySQL version: 3.23.33
Table Types: MYISAM
1) The data is only stored for 24hrs. If I do continuous deletes from the
tables, will the AUTO_INCREMENT
Quoting Alessandro Coppelli ([EMAIL PROTECTED]):
> I have this simple table
>
> create table tbl (
> sid int not null auto_increment ,
> filed1 LONGTEXT,
> field2 LONGTEXT,
>primary key (sid)
> )
>
> When I insert one item ( insert into t
Hi to all.
I have this simple table
create table tbl (
sid int not null auto_increment ,
filed1 LONGTEXT,
field2 LONGTEXT,
primary key (sid)
)
When I insert one item ( insert into tbl values (filed1,filed2) ) I
obtain error .
Why ?
Must I insert the sid ? If yes
gt; >can i somehow easily recreate the auto_increment col if is was not
>> >correctly set?
>> >i just recognized that most rows contain "1" cause the primary key was
>> >set
>> >on the auto_increment col + another one.
>> >so mysql only
On Thu, Jun 14, 2001 at 07:30:01PM -0500, Paul DuBois wrote:
> *This message was transferred with a trial version of CommuniGate(tm) Pro*
> At 1:36 AM +0200 6/15/01, Sven Huster wrote:
> >Hi there
> >
> >can i somehow easily recreate the auto_increment col if is was no
At 1:36 AM +0200 6/15/01, Sven Huster wrote:
>Hi there
>
>can i somehow easily recreate the auto_increment col if is was not
>correctly set?
>i just recognized that most rows contain "1" cause the primary key was
>set
>on the auto_increment col + another one.
>so
501 - 600 of 692 matches
Mail list logo