by a string "comp-06" and the next value
of a
> sequence (similar to auto_increment). In MySQL there're no sequences, or
> better, there's only an auto_increment action on an int field. How can I
> obtain the same effect of the concatenation of a sequence and a string
) NOT NULL DEFAULT ('comp-06-'::text ||
(nextval('sequenza_competenza'::regclass))::text),
descrizione character varying(100),
CONSTRAINT competenza_pkey PRIMARY KEY (id_competenza)
)
there, id_competenza is compound by a string "comp-06" and the next value of a
We ship out mySQL on our appliances in enterprise level scenarios. We
often
like to start the AUTO_INCREMENT for several tables at 10,000 -- this way
we
can reserve the lower 'block' of IDs for our own internal and 'default'
use
so all customers have the same basic data
bles from MYISM to
INNODB, only
to find out this colossal design flaw in InnoDB tables.
We ship out mySQL on our appliances in enterprise level scenarios. We
often
like to start the AUTO_INCREMENT for several tables at 10,000 -- this
way we
can reserve the lower 'block' of IDs for o
les.
We ship out mySQL on our appliances in enterprise level scenarios. We often
like to start the AUTO_INCREMENT for several tables at 10,000 -- this way we
can reserve the lower 'block' of IDs for our own internal and 'default' use
so all customers have the same basic database
the AUTO_INCREMENT for several tables at 10,000 -- this way we
can reserve the lower 'block' of IDs for our own internal and 'default' use
so all customers have the same basic database schema. It also makes our code
easier to write as we can, in one easy swoop, make the ID
On 9/26/2006 4:02 PM, Dan Buettner wrote:
> Jorrit, it's a known behavior, not a bug.
>
> Recent versions of MySQL will, when given a zero (0) as a value for an
> auto incrementing identity column, simply fill in the next auto
> incrementing value ... unless you flip a switch to specifically tell
l.com/doc/refman/4.1/en/server-sql-mode.html and look
for NO_AUTO_VALUE_ON_ZERO
HTH,
Dan
On 9/26/06, Jorrit Kronjee <[EMAIL PROTECTED]> wrote:
Dear list,
I discovered something that seems to be odd behaviour.
I have a basic table with one column set to auto_increment:
mysql> DESCRI
Dear list,
I discovered something that seems to be odd behaviour.
I have a basic table with one column set to auto_increment:
mysql> DESCRIBE basic_table;
+---+-+--+-+-++
| Field | Type| Null | Key | Default | Ex
At 14:16 -0500 9/22/06, [EMAIL PROTECTED] wrote:
>> I seem to recall that when creating a table, you could designate an
>> auto_increment field to begin counting at zero(0) instead of one (1),
but I
>> can't find an example in the documents.
>>
> Don'
At 14:16 -0500 9/22/06, [EMAIL PROTECTED] wrote:
I seem to recall that when creating a table, you could designate an
auto_increment field to begin counting at zero(0) instead of one (1), but I
can't find an example in the documents.
Don't store 0 in an AUTO_INCREMENT column.
--
P
NO_AUTO_VALUE_ON_ZERO
Dan
On 9/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Thanks, Dan, but I can't get it to work. Defining a column like this:
<< a int not null auto_increment=0 primary key >>
throws an error, and while the alter table statement seems to work ok,
whether th
OK. If you assign to auto_increment any number higher than what currently
exists in the column, it changes the value and the incremented sequence
from that point. But apparently you can't assign the value zero to the
column, even if the table is empty.
> Thanks, Dan, but I can't g
Thanks, Dan, but I can't get it to work. Defining a column like this:
<< a int not null auto_increment=0 primary key >>
throws an error, and while the alter table statement seems to work ok,
whether the table is empty or not, it has no effect on subsequent inserts.
I'm wonde
David - there's some info in the online docs here:
http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html
Specifically:
To start with an AUTO_INCREMENT value other than 1, you can set that
value with CREATE TABLE or ALTER TABLE, like this:
mysql> ALTER TABLE tbl AUTO_INCREME
I seem to recall that when creating a table, you could designate an
auto_increment field to begin counting at zero(0) instead of one (1), but I
can't find an example in the documents.
I'm using 4.0.16 and table type=myisam.
David
--
MySQL General Mailing List
For list arch
= 65535
# MEDIUMTEXT = 16777215
# LONGTEXT = 4294967295
DÆVID
> -Original Message-
> From: Daniel Kasak [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 13, 2006 9:52 PM
> To: wolverine my; mysql@lists.mysql.com
> Subject: Re: Reset (or Defrag) the AUTO_IN
t;
> I have the following tables and the data,
>
> CREATE TABLE category (
>id TINYINT UNSIGNED AUTO_INCREMENT PRIMARY KEY
>name VARCHAR(50) NOT NULL
> );
>
> CREATE TABLE user (
>id TINYINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
>name VARCHAR(5
wolverine my wrote:
> Yes, I agree on what you have described.
>
> However, what should we do when the value is reaching the maximum? To
> alter the data type to a bigger one?
Yes - convert the data type to a larger one.
If you've got a mediumint, for example, you can convert it to an
unsigned m
same primary key. How do you figure out which
record is the oldest one, which is the 2nd oldest one, which is the
current one, etc? What happens if you have records in a related column
that were referring to this primary key? You've got a big mess!
Also, there's no such thing as 'd
o this primary key? You've got a big mess!
Also, there's no such thing as 'defrag'ing an auto_increment column. The
space left when you delete a row will be taken by another record when
MySQL sees fit.
If you absolutely must have a continuous stream of numbers for your
primary
Hi!
I have the following tables and the data,
CREATE TABLE category (
id TINYINT UNSIGNED AUTO_INCREMENT PRIMARY KEY
name VARCHAR(50) NOT NULL
);
CREATE TABLE user (
id TINYINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50) NOT NULL,
category TINYINT UNSIGNED REFERENCES
On 6/13/06, Rob Desbois <[EMAIL PROTECTED]> wrote:
If you are going to specify values for all columns in your insert, you should
put NULL as the value for an AUTO_INCREMENT column, e.g.
mysql> insert into SalesSupData values (NULL,2,2,'test',140);
My preferred way however i
If you are going to specify values for all columns in your insert, you should
put NULL as the value for an AUTO_INCREMENT column, e.g.
mysql> insert into SalesSupData values (NULL,2,2,'test',140);
My preferred way however is to put the column names and just miss out the
auto_inc
I have a problem with inserting data into table in Mysql.
I have a Auto_increment Column in Table which throws errors when I try
to insert into the table.
This is table description.
mysql> desc SalesSupData;
+-+-+--+-+-++
| Fi
auto_increment, no?
Cheers.
$people = "INSERT INTO people (people_id, people_full_name,
people_isactor, people_isdirector) VALUES (1, 'Jim Carey', 1, 0),
(2, 'Tom Shadyac', 0, 1), (3, 'Lawrence Kasdan', 0, 1), (4, 'Kevin
Kline', 1, 0), (5,
Hi Mark
People_id is the column with auto increment? You can verify that it
really does have auto_increment by using the "describe" command. For
example:
mysql> describe checks;
+-+--+--+-+-
++
| Field
Hi All,
if a table has an auto_incremented primary key why does the below code
require the people_id to be manually inserted? I got this from Beginning
PHP, Apache, MySQL Web Development book from Wrox. Curious, as it seems
to defeat the purpose of auto_increment, no? Cheers.
$people
Figured out what was causing it
The /etc/my.cnf had a line in it, in the [mysqldump] section...
compatible=mysql40
Comment that line out and it works - we need that when sending data to
customers who are still running mysql40.
Now I know whats causing it, I can work around it.
Many thanks,
Ia
Imran,
Thanks for your reply.
I tried what you asked, and it did the same.
I then went onto a couple of other boxes with EXACTLY the same MySQL install
and they worked (added the auto_increment).
The box that fails is running Redhat 7.3 (for customer backward
compatibilty). I dont have any other
Hi,
I got confused looking to see if this was a known problem - so thought I'd
try again.
mysql_standard 4.1.16 on Linux...
Synopsis:
Create table with auto_increment
mysqldump database
output doesn't create table with auto_increment.
Example:
Create a table in a junk database usin
You can override MySQL behaviour of generating a new value if you insert a 0
into an auton_increment field.
Quoting from the manual:
> NO_AUTO_VALUE_ON_ZERO affects handling of AUTO_INCREMENT columns.
> Normally, you generate the next sequence number for the column by inserting
> eithe
On 30/03/2006 12:31 p.m., Daniel Kasak wrote:
[EMAIL PROTECTED] wrote:
I suppose that would be alot easier than trying to bump the PK and
related FK values of the whole table by 1, just to give the first row
in the table the auto_increment value of 1?
Yes. That sounds messy.
What about
next auto_increment
value?
Not really. The primary key isn't ( or at least shouldn't be ) used to
determine 'position' in the record. If you are actually using the
primary key to determine 'position', ie select * from table order by
primary_key ... then yes, the posi
Are you saying just change the row with the 0 value as the
PK, and change the FK's in the related tables to point to
the new value instaed of 0?
If so, would this move the row logically to the end of the
table, if the 0 PK was replaced with the next auto_increment
value?
I suppose
Stanton, Brian wrote:
I'm migrating a database from 4.0.12 on Solaris to 4.0.18-0 on Red Hat
Linux. A few of the tables have a 0 (zero) in the auto_increment primary
key column. However, when importing, the 0 in the insert is translated to
the next available auto_increment value thus caus
I'm migrating a database from 4.0.12 on Solaris to 4.0.18-0 on Red Hat
Linux. A few of the tables have a 0 (zero) in the auto_increment primary
key column. However, when importing, the 0 in the insert is translated to
the next available auto_increment value thus causing a duplicate key
situ
On 24/03/2006 11:06 a.m., Eric Beversluis wrote:
Can someone illustrate the correct syntax for using auto_increment in
making a table? I've studied the manual and I'm not seeing how it comes
out.
EG:
CREATE TABLE Books (
bookID INT(5) PRIMARY KEY AUTO_INCREMENT...
THEN WHAT?
Can someone illustrate the correct syntax for using auto_increment in
making a table? I've studied the manual and I'm not seeing how it comes
out.
EG:
CREATE TABLE Books (
bookID INT(5) PRIMARY KEY AUTO_INCREMENT...
THEN WHAT?
Thanks.
EB
--
MySQL General Mailing List
For lis
You can change the table definition to not have the auto_increment
column, and then ALTER TABLE MODIFY COLUMN after that. However, if
you post your errors here, perhaps you'll get the answer that actually
solves the problem, instead of working around it to possibly leave bad
data for y
wrote:
> Hi All,
>
> I'm trying to restore a database where the first column is set to
> auto_increment. When I apply the inserts created from the mysqldump I get
> errors about the auto_increment column. Is there a may to turn it off while
> I run the inserts or do I have to m
Hi All,
I'm trying to restore a database where the first column is set to
auto_increment. When I apply the inserts created from the mysqldump I get
errors about the auto_increment column. Is there a may to turn it off while
I run the inserts or do I have to modify the table?
Thanks,
Anybody has idea about primary key generator to replace auto_increment
as primary key?
I found this problem too (http://bugs.mysql.com/bug.php?id=16979)
since huge insert/update/select count(*) work parallel
frequently, . i got deadlock :(
Thx
--
MySQL General Mailing List
Anybody has idea about primary key generator to replace auto_increment
as primary key?
I found this problem too (http://bugs.mysql.com/bug.php?id=16979)
since huge insert/update/select count(*) work parallel
frequently, . i got deadlock :(
Thx
--
MySQL General Mailing List
For list
http://dev.mysql.com/doc/refman/4.1/en/odbc-and-last-insert-id.html
|
| Cal Evans
| http://www.calevans.com
|
Danesh Daroui wrote:
Hi all,
I have a simple table with an Auto_Increment column. I insert NULL
to this column each time I insert a row to have an automatic unique
value
Hi all,
I have a simple table with an Auto_Increment column. I insert NULL
to this column each time I insert a row to have an automatic unique
value. The problem is that I want to have new automatically generated
value back to insert it to another table. How can I have new
Hi all,
I have a simple table with an Auto_Increment column. I insert NULL to this
column each time I insert a row to have an automatic unique value. The problem
is that I want to have new automatically generated value back to insert it to
another table. How can I have new
InterNetX - Andreas Prasch wrote:
Hi,
I have a master and a slave mysql server. On the master I write binlogs
needed for replication. From time to time I have chronological
auto_increment problems, here's a short explanation.
- the table structure :
| Field | Type| Null | Key | De
Hi,
I have a master and a slave mysql server. On the master I write binlogs
needed for replication. From time to time I have chronological
auto_increment problems, here's a short explanation.
- the table structure :
| Field | Type| Null | Key | Default |
Eamon Daly wrote:
We have a table containing just one column that we use for
unique IDs:
CREATE TABLE `id_sequence` (
`id` int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (`id`)
) TYPE=MyISAM
Watching 'SHOW FULL PROCESSLIST' and reading the slow query
log shows the occasion
AUTO_INCREMENT columns in InnoDB.
See:
http://dev.mysql.com/doc/mysql/en/innodb-auto-increment-column.html
"Eamon Daly" <[EMAIL PROTECTED]> wrote:
> We have a table containing just one column that we use for
> unique IDs:
>
> CREATE TABLE `id
<[EMAIL PROTECTED]>
> To: "Eamon Daly" <[EMAIL PROTECTED]>
> Cc:
> Sent: Wednesday, August 24, 2005 12:05 PM
> Subject: Re: MyISAM vs. InnoDB for an AUTO_INCREMENT counter table
>
>
> > "Eamon Daly" <[EMAIL PROTECTED]> wrote on 08/24/
Sent: Wednesday, August 24, 2005 12:05 PM
Subject: Re: MyISAM vs. InnoDB for an AUTO_INCREMENT counter table
"Eamon Daly" <[EMAIL PROTECTED]> wrote on 08/24/2005 12:40:55 PM:
We have a table containing just one column that we use for
unique IDs:
CREATE TABLE `id_sequence` (
`i
"Eamon Daly" <[EMAIL PROTECTED]> wrote on 08/24/2005 12:40:55 PM:
> We have a table containing just one column that we use for
> unique IDs:
>
> CREATE TABLE `id_sequence` (
> `id` int(10) unsigned NOT NULL auto_increment,
> PRIMARY KEY (`id`)
> )
We have a table containing just one column that we use for
unique IDs:
CREATE TABLE `id_sequence` (
`id` int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (`id`)
) TYPE=MyISAM
Watching 'SHOW FULL PROCESSLIST' and reading the slow query
log shows the occasional backlog of
YES | | NULL
| |
| SN | int(11) | | UNI | NULL |
auto_increment |
+---+--+--+-+---++
6 rows in set (0.00 sec)
client: OS fedora3 MyODBC3.51.10 unixODBC 2.2.9
server: OS Red
ULL
| |
| SN | int(11) | | UNI | NULL |
auto_increment |
+---+--+--+-+---++
6 rows in set (0.00 sec)
client: OS fedora3 MyODBC3.51.10 unixODBC 2.2.9
server: OS RedHat Adavanced server3.0 My
62141 | text |
> | 262142 | text |
> | 262143 | text |
> | 262144 | text |
> ++--+
> 5 rows in set (0.00 sec)
>
> it's surprising that you can insert NULL in a primary key auto_increment.
> second, with only 1 values, if the auto_increment
Hi Sven,
Last_insert_id is not what your're looking for, for the same reason you give
about max(id) : your insert can find a duplicate key because another user
inserted an id between two of yours.
Last_insert_id gives just the last auto_increment id for success in insertion.
Suppose that
try to insert an existing value (in the second column), the LAST_INSERT_ID()
contains a random value (the next auto_increment value going to be used?)
afterwards.
So I can't rely in retrieving LAST_INSERT_ID().
> Since last_insert_id() has a connection scope, it's better for you to use
ven Paulus <[EMAIL PROTECTED]>:
> Hi,
>
> I'd like to insert string values into a table. If I add a new string, I want
> to get back the value of the AUTO_INCREMENT column. If the string already
> exists in the table, I'd like to get the AUTO_INCREMENT value of
Hi,
I'd like to insert string values into a table. If I add a new string, I want
to get back the value of the AUTO_INCREMENT column. If the string already
exists in the table, I'd like to get the AUTO_INCREMENT value of the existing
entry.
I thought this might be possible using INS
Partha,
Partha Dutta wrote:
This may not be a very elegant solution, but you can do this just to get the
inserts going again:
ALTER TABLE users
MODIFY COLUMN uid INTEGER UNSIGNED NOT NULL AUTO_INCREMENT;
If you don't have any negative uids, then you will be able to store 2
billion more uids.
5 rows in set (0.00 sec)
it's surprising that you can insert NULL in a primary key auto_increment.
second, with only 1 values, if the auto_increment reached 2147483647 this
means that you have an intensive delete, or the auto_increment had been
altered.
you can create table toto like users,
Partha,
On 5/16/05, Partha Dutta <[EMAIL PROTECTED]> wrote:
> This may not be a very elegant solution, but you can do this just to get the
> inserts going again:
>
> ALTER TABLE users
> MODIFY COLUMN uid INTEGER UNSIGNED NOT NULL AUTO_INCREMENT;
>
> If you don't
This may not be a very elegant solution, but you can do this just to get the
inserts going again:
ALTER TABLE users
MODIFY COLUMN uid INTEGER UNSIGNED NOT NULL AUTO_INCREMENT;
If you don't have any negative uids, then you will be able to store 2
billion more uids.
Just out of curiosity,
le which
holds records from user profiles. It's a very simple table, with one
auto_increment field and a bunch of other field - nothing out of the
ordinary.
To those of you familiar with slashcode, it's an old version of the
users table:
CREATE TABLE users (
uid int(11) NOT NULL auto_inc
es is a key that maps
> to multiple rows in the other table. This is the sane thing to do if
> there were'nt any order requirements:
>
> CREATE TABLE Bar (
> ... other stuff ...
> key1 int unsigned not null auto_increment,
> UNIQUE (key1),
> ...
> );
> CR
x27;nt any order requirements:
CREATE TABLE Bar (
... other stuff ...
key1 int unsigned not null auto_increment,
UNIQUE (key1),
...
);
CREATE TABLE Foo (
key1 int unsigned not null,
key2 int unsigned not null,
value int,
PRIMARY KEY k (key1, key2)
);
However, I need to insert a set of
I have a table that I created by hand like this:
DROP TABLE IF EXISTS testset;
CREATE TABLE testset (
id int(10) unsigned NOT NULL auto_increment,
name varchar(50) NOT NULL default '',
special enum('','all','safe','unsafe') NOT NULL defaul
The reason I asked about auto_increment behavior is that I'm looking at
the output from mysqldump --opt and there are no commands to preserve/set
the auto_increment value. Is there a mysqldump option to do this? Or
will restoring from a dump always leave the auto_increment value one
gr
"Jim McAtee" <[EMAIL PROTECTED]> wrote on 02/24/2005 04:50:11 PM:
> Say a row is inserted into a table with an auto_increment column and
then
> deleted before another record is inserted. When a new row is inserted,
> will the value of the auto_increment column b
Jim McAtee wrote:
Say a row is inserted into a table with an auto_increment column and
then deleted before another record is inserted. When a new row is
inserted, will the value of the auto_increment column be the same as
the deleted record's, or will it be one greater?
Greater.
--
D
Say a row is inserted into a table with an auto_increment column and then
deleted before another record is inserted. When a new row is inserted,
will the value of the auto_increment column be the same as the deleted
record's, or will it be one greater?
--
MySQL General Mailing List
For
Hi!
For InnoDB,
CREATE TABLE ... AUTO_INCREMENT=...
works starting from 5.0.3. Until then, you have to use the 'insert + delete
a dummy row' method to init the counter.
Best regards,
Heikki Tuuri
Innobase Oy
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Back
On Tue, Feb 22, 2005 at 03:46:34PM -0600, Scott Purcell <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> ALTER TABLE tbl_name AUTO_INCREMENT = 1000
> will start your records at 1000
>
> But it does not work for myself. How can I get the auto_increment to
> begin at a set sta
Hello,
I am having trouble getting the auto_increment function to begin at a set
value. When I search the docs, I find information like:
Posted by Michael Craig on September 6 2002 9:51pm [
<http://dev.mysql.com/doc/mysql/comment.php?id=1058&action=delete> Delete]
it doesn't work with innodb table.
http://dev.mysql.com/doc/mysql/en/innodb-restrictions.html
InnoDB does not support the AUTO_INCREMENT table option for setting the
initial sequence value in a CREATE TABLE or ALTER TABLE statement. To set
the value with InnoDB, insert a dummy row with a
I am not really experienced on this, but i have noticed that simply
truncating an innodb table doesnt reset the autoinc key, u have to redump
the table.
I cant see what you are trying to do here
ALTER TABLE users auto_increment = 590;
set it to start @ 590 ?
> Hello,
> I am trying
Hello,
I am trying to get auto_increment to begin at a certain integer.
CREATE TABLE USERS (
user_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
username varchar(50),
firstname varchar(50),
middlename varchar(50),
lastname varchar(50),
email varchar(100
Hello.
Use the NO_AUTO_VALUE_ON_ZERO sql mode. See:
http://dev.mysql.com/doc/mysql/en/server-sql-mode.html
Philippe Rousselot <[EMAIL PROTECTED]> wrote:
> hi,
>
> I am migrating a DB having a table with a UID not_null autoincrement
>
> the original table starts at UID=0
>
hi,
I am migrating a DB having a table with a UID not_null autoincrement
the original table starts at UID=0
I cannot migrate this table autmaticaly as the line for UID=0 is
automatically transformed into UID=1 and therefore I get an error
message for the next line (UID=1) as being already into t
le will throw an error
> regarding a duplicate key value in an auto_increment field. I assume that
> something is corrupted.
>
> There are 779239 records, the most recently added having an auto_increment
> ID field of 779239. When a new record is added, MySQL attempts to give it
A server running MySQL 3.23 crashed yesterday. Since bringing it back
online, doing inserts into a particular table will throw an error
regarding a duplicate key value in an auto_increment field. I assume that
something is corrupted.
There are 779239 records, the most recently added having
Hello.
There were several bugs in older versions of MySQL related to 'duplicate entry'
errors. Do you use latest release? In documentation it is said that
AUTO_INCREMENT
works correctly with replication. Please also take a look in the documentation
at these links:
http://dev.mys
Can anybody tell me how AUTO_INCREMENT works in MySQL especially when we are
using DB Replications.
At times I get duplicate key error though taken care that the insertions and
updations are done in the master db.
According to 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.
It did not specify that the AUTO_INCREMENT column couldn't have a regular
index on it.
If you have this
Hi,
Is there any way AUTO_INCREMENT column cann't me Primary key ?
One table has one column auto_increment which I want to convert into non primary key
but I also want to maintain the column.How to do that? thanks
-
Do you
r
to that column by surrounding its name with backticks. May I suggest you
use an alternate spelling (like "key_") or an alternate name (like "id")
for your column to avoid needing backticks? Anyway, if you _must_ keep
your current design choice:
CREATE TABLE backticktest
Dears,
I need to define a column within my table.I want to
name it "key".Also i need to it is auto_increment &
not null.Also i want to it is primary key.
Please tell its statement.
Yours,Mohsen
=
-DIGITAL SIGNATURE---
///Mohsen Pahlevanzadeh///
Thanks!
-Original Message-
From: Victor Pendleton [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 11, 2004 3:40 PM
To: 'Scott Hamm '; ''Mysql ' (E-mail) '
Subject: RE: Auto_increment and existing table
If you do an
ALTER TABLE table_name MODIFY id INTEG
If you do an
ALTER TABLE table_name MODIFY id INTEGER AUTO_INCREMENT, ADD PRIMARY
KEY(id);
...
The next record entered should be properly auto_incremented.
-Original Message-
From: Scott Hamm
To: 'Mysql ' (E-mail)
Sent: 8/11/04 1:32 PM
Subject: Auto_increment and existing t
I've imported Access DB into MySQL, and AutoID was lost. The number in ID
column exists and I wonder if I update the column from int(10) to
auto_increment, will it replace existing number with MySQL's auto_increment
number? Or is there a proper way to update from int(10) to auto_increme
On Jun 23, 2004, at 8:15 AM, Michael Stassen wrote:
So, if I understand you correctly, somewhere in the middle of a 20,000
row insert, a row gets inserted with auto_increment id = 87,123,456,
say, then the next row tries to insert with the value 87,123,457 but
fails. You fix this by skipping
So, if I understand you correctly, somewhere in the middle of a 20,000 row
insert, a row gets inserted with auto_increment id = 87,123,456, say, then
the next row tries to insert with the value 87,123,457 but fails. You fix
this by skipping the next value with
ALTER TABLE yourtable
On Jun 18, 2004, at 5:31 PM, Scott Haneda wrote:
While I do not know why, I would suggest you simply drop the PK and
recreate
it, this should be a whole lot faster than the alter.
This took the same amount of time as the alter table (a little longer
actually). The documentation says that in late
Robert A. Rosenberg wrote:
At 13:37 -0400 on 06/19/2004, Michael Stassen wrote about Re:
AUTO_INCREMENT problem... ER_DUP_ENTRY? (No, it's not a:
Finally, just to cover all the bases, that really is 87 million
inserts, not
8.7 million, right? I only ask because a MEDIUMINT column runs
At 13:37 -0400 on 06/19/2004, Michael Stassen wrote about Re:
AUTO_INCREMENT problem... ER_DUP_ENTRY? (No, it's not a:
Finally, just to cover all the bases, that really is 87 million inserts, not
8.7 million, right? I only ask because a MEDIUMINT column runs out a little
past 8.3 millio
At 17:16 -0700 on 06/18/2004, Kevin Brock wrote about AUTO_INCREMENT
problem... ER_DUP_ENTRY? (No, it's not a one:
We have a table with a primary index which is INT NOT NULL
AUTO_INCREMENT.
After inserting ~87,000,000 entries, we started seeing error 1062,
ER_DUP_ENTRY.
You are wasting half
On Jun 19, 2004, at 10:37 AM, Michael Stassen wrote:
Something about your description doesn't quite fit, however. You say
that you are "nowhere near the limit", but you say that resetting the
"auto_increment starting point" fixes the problem. Those seem
contradict
101 - 200 of 692 matches
Mail list logo