y in since, it should work :) I guess I could also add in
> a unique machine id like time integer key + M for master or S for slave S2
> S3 etc. Does that sound insane?
Doesn't sound insane at all. We've been using something like that for the
past 4 years (before auto_increment
munication between master & slave, and volume of records going in.
>
>I have *not* implemented such a system, but this could work, depending on
>your app.
>
>sean
>
>
>- Original Message -
>From: "Eric Frazier" <[EMAIL PROTECTED]>
>To: <
Hi all!
In MySQL, is replication of auto_increment (primary keys) in a master-master mode
working? or is it only working with master-slave?
-Jon
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual
Well. Good to know. So I guess the only alternative would be to generate
keys by date/time?
I was hoping to avoid that. I am still worried about the timestamp type not
having good enough resolution. Seconds are pretty broad.
Thanks,
Eric
>You're asking for trouble. :-)
>
>AUTO_INCREMENTS a
if you set it up so that the slaves occasionally update the master, you can
get around the
problem as follows.
For the *primary* table(s), when you update the master, get the data for 1
row to update from the
slave.
When you insert this row into the master, remove the auto_increment field
from
On Wed, Jul 03, 2002 at 10:54:23AM -0700, Eric Frazier wrote:
> From the manual 4.10.4
> "Replication will be done correctly with AUTO_INCREMENT, LAST_INSERT_ID(),
> and TIMESTAMP values."
>
> I am somewhat fearful and curious about how this works. Say we have
> a m
From the manual 4.10.4
"Replication will be done correctly with AUTO_INCREMENT, LAST_INSERT_ID(),
and TIMESTAMP values."
I am somewhat fearful and curious about how this works. Say we have a
master web database that gets replicated back to the office slave over the
Internet. A per
;
>I don't want the auto-increment id to be duplicated - I believe this happens
>when the auto_increment column is not the first column - so a
>multi-column index
>of name,id seems to be out.
>
>Can I do this and if so how?
No.
You have no say in how the server stores rows in
cker.
>
> I don't want the auto-increment id to be duplicated - I believe this
> happens when the auto_increment column is not the first column - so a
> multi-column index of name,id seems to be out.
Your choice of primary key has no bearing at all on where mysql decides
to store a
lieve this happens
when the auto_increment column is not the first column - so a multi-column index
of name,id seems to be out.
Can I do this and if so how?
Many thanks
--
Bill Ferrett
Accroserve Systems Ltd.
Office: 01702 342148
Mobile: 07855 8
Taylor Lewick wrote:
>Hi all. I have searched the documentation, and i found some info, but I wanted to ask
>the lsit a little more about auto_increment.
>
>First, if I use auto_increment, and then delete a field, I assume mysql leaves the
>remaining fields with the original
Hi all. I have searched the documentation, and i found some info, but I wanted to ask
the lsit a little more about auto_increment.
First, if I use auto_increment, and then delete a field, I assume mysql leaves the
remaining fields with the original numbers...
i.e. if I haverows 1 through 10
Bobby,
Wednesday, June 05, 2002, 1:30:17 PM, you wrote:
BO> I have a database with the following table and data:
BO> When I add a new record the auto_increment number becomes '2147483647'
BO> not sure why? Checked the SHOW TABLE STATUS too and this shows that the
BO> next
Cool, no negatives reset the key and it works, thanks,
> -Original Message-
> From: Bobby Oswald
> Sent: 05 June 2002 13:50
> To: Fred van Engen; [EMAIL PROTECTED]
> Subject: RE: Problem when inserting a record - auto_increment
> field gets max integer value
their latest auto_increment ID. I believe there is also a
command you can use to reset the auto_increment ID, but you would
still need to take care to not insert negative values.
Regards,
Fred.
> > -Original Message-
> > From: Fred van Engen [mailto:[EMAIL PROTECTED]]
> >
Removed all the negative values and the same problem still occurs
> -Original Message-
> From: Fred van Engen [mailto:[EMAIL PROTECTED]]
> Sent: 05 June 2002 12:50
> To: [EMAIL PROTECTED]
> Subject: Re: Problem when inserting a record - auto_increment
> field gets
Bobby,
On Wed, Jun 05, 2002 at 12:30:17PM +0200, Bobby Oswald wrote:
> I have a database with the following table and data:
>
> When I add a new record the auto_increment number becomes '2147483647'
> not sure why? Checked the SHOW TABLE STATUS too and this shows that the
Hi,
I have a database with the following table and data:
When I add a new record the auto_increment number becomes '2147483647'
not sure why? Checked the SHOW TABLE STATUS too and this shows that the
next auto_increment number will be '2147483647' anyone know why?
R
At 18:29 -0400 5/22/02, Jule wrote:
>Hey guys,
>when i delete a row using the query DELETE FROM $table WHERE id = "3" LIMIT 1;
>
>how can i make it that the id column (auto_increment) starts over from 1 and
>build up to however many rows there are without counting 1
Hey guys,
when i delete a row using the query DELETE FROM $table WHERE id = "3" LIMIT 1;
how can i make it that the id column (auto_increment) starts over from 1 and
build up to however many rows there are without counting 1 2 4 5 6 etc.?
any id
Thanks to Paul Dubois, I've figured out the problem of setting
AUTO_INCREMENT to a default value in batch mode (from within a .sql
file). I was executing a 'DELETE FROM' statement immediately before my
'LOAD DATA ' statement, which knocks the default value down to 0,
reg
>> >> >Hmm. I'm not using INSERT, but LOAD DATA. Maybe that's the culprit?
>> >>
>> >> Maybe. In data files loaded with LOAD DATA, NULL values
>>should be specified
>> >> as \N, not as the word NULL.
>> >> I'
>> Maybe. In data files loaded with LOAD DATA, NULL values should be specified
> >> as \N, not as the word NULL.
> >> I'm not sure that that will make a difference, though. MySQL will see NULL,
> >> perform a string-to-number conversion and end up with a v
tatements differently in batch mode
>> >> than in interactive mode.
>> >
>> >Hmm. I'm not using INSERT, but LOAD DATA. Maybe that's the culprit?
>>
>> Maybe. In data files loaded with LOAD DATA, NULL values should be specified
>> as \N, n
> >> >> AN> Win/98
> >> >> AN> MySQL 3.23.46
> >> >>
> >> >> AN> I'm trying to use AUTO_INCREMENT=1000 to specify my
> >>staring value in an
> >> >> AN> ID column in batch mode, but it doe
At 17:41 -0400 5/13/02, Amer Neely wrote:
>Paul DuBois wrote:
>>
>> At 15:23 -0400 5/13/02, Amer Neely wrote:
>> > > Amer,
>> >> Monday, May 13, 2002, 2:03:28 AM, you wrote:
>> >>
>> >> AN> Win/98
>> >>
Curtis Maurand wrote:
>
> How about:
>
> UserID SMALLINT UNSIGNED AUTO_INCREMENT NULL PRIMARY KEY DEFAULT 1000
>
> Curtis
>
Good suggestion. But it too returns 1..7 when I do a 'select userid from
respondents'.
> Amer Neely said:
> >> Amer,
>
Paul DuBois wrote:
>
> At 15:23 -0400 5/13/02, Amer Neely wrote:
> > > Amer,
> >> Monday, May 13, 2002, 2:03:28 AM, you wrote:
> >>
> >> AN> Win/98
> >> AN> MySQL 3.23.46
> >>
> >> AN> I'm trying to use AUTO
How about:
UserID SMALLINT UNSIGNED AUTO_INCREMENT NULL PRIMARY KEY DEFAULT 1000
Curtis
Amer Neely said:
>> Amer,
>> Monday, May 13, 2002, 2:03:28 AM, you wrote:
>>
>> AN> Win/98
>> AN> MySQL 3.23.46
>>
>> AN> I'm trying to use AUTO_IN
At 15:23 -0400 5/13/02, Amer Neely wrote:
> > Amer,
>> Monday, May 13, 2002, 2:03:28 AM, you wrote:
>>
>> AN> Win/98
>> AN> MySQL 3.23.46
>>
>> AN> I'm trying to use AUTO_INCREMENT=1000 to specify my staring value in an
>> AN>
t;MySQL" by Paul DuBois [p.94, chap.2.]. Again,
>this works in interactive mode, but NOT in batch mode. Can you or
>someone explain how this can be done in batch mode?
>
What you can do is the following:
After the Create table command, add :
Alter table Respondents auto_increment=1000
> Amer,
> Monday, May 13, 2002, 2:03:28 AM, you wrote:
>
> AN> Win/98
> AN> MySQL 3.23.46
>
> AN> I'm trying to use AUTO_INCREMENT=1000 to specify my staring value in an
> AN> ID column in batch mode, but it doesn't want to work. I can get it to
Amer,
Monday, May 13, 2002, 2:03:28 AM, you wrote:
AN> Win/98
AN> MySQL 3.23.46
AN> I'm trying to use AUTO_INCREMENT=1000 to specify my staring value in an
AN> ID column in batch mode, but it doesn't want to work. I can get it to
AN> work in interactive mo
Win/98
MySQL 3.23.46
I'm trying to use AUTO_INCREMENT=1000 to specify my staring value in an
ID column in batch mode, but it doesn't want to work. I can get it to
work in interactive mode though.
In a file (create_tables.sql) I have:
CREATE TABLE Respondents (UserID SMALLIN
At 14:17 -0700 4/15/02, Tani Hosokawa wrote:
>If you have a table with an auto_increment column and one of the rows
>has the value set to 0, doing an ALTER TABLE will change that value to
>either 2147483647 or the next auto_increment value.
Storing anything other than positive integ
If you have a table with an auto_increment column and one of the rows
has the value set to 0, doing an ALTER TABLE will change that value to
either 2147483647 or the next auto_increment value.
mysql> create table blah (id int not null primary key auto_increment,stuff char(128));
Query OK, 0 r
mysql... see below, got caught be the filter of this list...
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Kevin Smith" <[EMAIL PROTECTED]>
Sent: Sunday, April 14, 2002 3:13 PM
Subject: Re: auto_increment setting the start number
> Your message cannot be
;| Field | Type | Null | Key | Default | Extra
>> |
>>
>>+-+--+--+-+-+----+
>> >| thread_ID | int(11) | | PRI | NULL| auto_increment
>> |
>> >| subject | varchar(2
Check out this: http://www.mysql.com/doc/L/O/LOCK_TABLES.html
User 1 must do a 'write lock' on the table, before calling the insert
statement. Then User 2's qery will have to wait till User 1 calls Unlock.
USER 1 ===> WRITE LOCK
>
> USER 1 ===> INSERT
> STOP <== due to process sch
+--+-+-++
> > >| Field | Type | Null | Key | Default | Extra
> > |
> >
> >+-+--+--+-+-----+----+
> > >| thread_ID | int(11) | | PRI | NULL| auto_incr
| Null | Key | Default | Extra
> |
>
>+-+--+--+-+-++
> >| thread_ID | int(11) | | PRI | NULL| auto_increment
> |
> >| subject | varchar(255) | YES | | NULL|
> |
> >| author | varchar(30) | YES |
thread_ID | int(11) | | PRI | NULL | auto_increment |
>| subject | varchar(255) | YES | | NULL||
>| author | varchar(30) | YES | | NULL||
>| last_by | varchar(30) | YES | | NULL|
ULL | auto_increment |
| subject | varchar(255) | YES | | NULL||
| author | varchar(30) | YES | | NULL||
| last_by | varchar(30) | YES | | NULL||
| views | int(11) | |
ROTECTED]]
Sent: Thursday, March 28, 2002 4:45 PM
To: [EMAIL PROTECTED]
Subject: auto_increment question
This is my first time posting to this list, so please forgive me if I am not
doing this correctly. I will break this into post into two parts: what i
want to know and why. Is there a way to get
Jeff Habermann asked:
> well. Now, because of this deletion, there are sequence gaps in the "idx"
> field. We would like to be able to use those numbers again for incoming
> clients...Is this possible?
It looks like you can, but IMHO, it would probably be more effective to add
a DELETED flag to
This is my first time posting to this list, so please forgive me if I am not
doing this correctly. I will break this into post into two parts: what i
want to know and why. Is there a way to get auto_increment fields to fill
in gaps in the numbering sequence if some records have been deleted
2_ What's happens when the highest value is reached
I have made a try with :
create table Generator (Sequence smallint(7) zerofill unique primary key
not null auto_increment ) type=innodb ;
insert into Generator values(null);
update Generator se
TED]> To: "Eric Baines"
<[EMAIL PROTECTED]>, [EMAIL PROTECTED]
cc:
03/25/02 03:02 PMSubjec
At 14:54 -0500 3/25/02, Eric Baines wrote:
>I have created a table with a Primary Key that is an auto_incrementing
>field. I was able to receive the auto_increment values by issuing a
>last_insert_id(). When I added a timestamp to this table, the
>last_insert_id() no longer return
I have created a table with a Primary Key that is an auto_incrementing
field. I was able to receive the auto_increment values by issuing a
last_insert_id(). When I added a timestamp to this table, the
last_insert_id() no longer returned any value except 0.
Is there a MySQL rule that you can
Hi Kevin,
> I'm converting a database from a filesharing based technology to mySQL. The
> database has its own column type called Sequence which is the same as using
> the AUTO_INCREMENT property. I'd like to use AUTO_INCREMENT if possible but
> I'm not really sure
Hi.
I'm converting a database from a filesharing based technology to mySQL. The
database has its own column type called Sequence which is the same as using
the AUTO_INCREMENT property. I'd like to use AUTO_INCREMENT if possible but
I'm not really sure what I can do with it - c
Thank you, we shall investigate this problem.
--
Regards,
__ ___ ___ __
/ |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com
.
-Original Message-
From: Wei Gao [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 2:10 PM
To: [EMAIL PROTECTED]
Subject: Reset auto_increment
Hi,
As I am new to MySQL, perhaps this is a common question you have been asked.
I have a field "Id" which using auto_increm
Hi,
As I am new to MySQL, perhaps this is a common question you have been asked.
I have a field "Id" which using auto_increment. Now I want to reset the
value of auto_increment, that is the "Id" starts form 1 and does not skip
the number. I have spent a few hours to find a
i believe since 3.23.39 it should not be?
mysql> create table t1_b(i int unsigned primary key
auto_increment, j int) type=bdb;
mysql> create table t1_m(i int unsigned primary key
auto_increment, j int) type=myisam;
mysql> insert into t1_bdb(j)values(0);
mysql> insert into t1_bd
At 11/02/2002 05:21, Paul DuBois wrote:
>At 4:10 +0700 2/11/02, Steven Haryanto wrote:
>>i believe since 3.23.39 it should not be?
>
>BDB and MyISAM tables have different properties with respect to
>AUTO_INCREMENT behavior.
i see, so this is an "undocumented feature&qu
At 11/02/2002 05:21, Paul DuBois wrote:
>At 4:10 +0700 2/11/02, Steven Haryanto wrote:
>>i believe since 3.23.39 it should not be?
>
>BDB and MyISAM tables have different properties with respect to
>AUTO_INCREMENT behavior.
i see, so this is an "undocumented feature&qu
At 4:10 +0700 2/11/02, Steven Haryanto wrote:
>i believe since 3.23.39 it should not be?
BDB and MyISAM tables have different properties with respect to
AUTO_INCREMENT behavior.
>
>mysql> create table t1_b(i int unsigned primary key auto_increment,
>j int) type=bdb;
>mysql>
i believe since 3.23.39 it should not be?
mysql> create table t1_b(i int unsigned primary key
auto_increment, j int) type=bdb;
mysql> create table t1_m(i int unsigned primary key
auto_increment, j int) type=myisam;
mysql> insert into t1_bdb(j)values(0);
mysql> insert into t1_bd
ou are trying to restart numbering while not deleting records,
>forget-about-it.
ALTER TABLE tbl_name
DROP id,
ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT FIRST,
AUTO_INCREMENT = 1;
But why do this? MySQL doesn't care if the sequence has holes in
it or not.
>-Original Message-
>
.
-Original Message-
From: Wei Gao [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 2:10 PM
To: [EMAIL PROTECTED]
Subject: Reset auto_increment
Hi,
As I am new to MySQL, perhaps this is a common question you have been asked.
I have a field "Id" which using auto_increm
Hi,
As I am new to MySQL, perhaps this is a common question you have been asked.
I have a field "Id" which using auto_increment. Now I want to reset the
value of auto_increment, that is the "Id" starts form 1 and does not skip
the number. I have spent a few hours to find a
Hi Michael
01.02.02 16:27:24, "Fochtman, Michael" <[EMAIL PROTECTED]> wrote:
>BMJI,
>
>But isn't 'last_insert_id()' only meant to be called after inserting a
>record?? If you've never inserted a record (using the current connection),
>it seems like calling 'last_insert_id()' would be a meaningl
Hi Bruce
01.02.02 15:41:49, Bruce Stewart <[EMAIL PROTECTED]> wrote:
>Hi Andreas,
>
>> >I think AUTO_INCREMENT is on a per-connection basis. So if
>> you're doing
>> >this across different database connections, it will reset to 0.
>[snip]
>&g
e Fochtman
> -Original Message-
> From: Bruce Stewart [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 01, 2002 9:42 AM
> To: 'Andreas Schoelver'; [EMAIL PROTECTED]
> Subject: RE: AUTO_INCREMENT columns randomly restart counting from 1
>
>
> Hi Andre
Hi Andreas,
> >I think AUTO_INCREMENT is on a per-connection basis. So if
> you're doing
> >this across different database connections, it will reset to 0.
[snip]
> do a 'select * from where test=1' and you will
> see that the 2 new
> values will b
$recno LIMIT 1";
$result = mysql_query($query) or die("Error: ".mysql_error());
?>
-Original Message-
From: Zak Grant [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 6:08 AM
To: [EMAIL PROTECTED]
Subject: Next auto_increment value?
All,
I'm a
All,
I'm a little (lot!) stuck on generating what seems to be quite a simple
query...
Example:
I have a table with ID as auto_increment
It contains values 1 to 10
I delete #7
How can I, using MySQL, say "I have the number 6 - what's the next valid ID
up/down from this?&qu
30.01.02 17:48:06, Richard Bolen <[EMAIL PROTECTED]> wrote:
>
>I think AUTO_INCREMENT is on a per-connection basis. So if you're doing
>this across different database connections, it will reset to 0.
no, that's not the case.
just try it.
crate a table with column id as
I think AUTO_INCREMENT is on a per-connection basis. So if you're doing
this across different database connections, it will reset to 0.
Rich
Hi there
We have some table used as sequences.
They only have 2 columns (ID, PID), with the AUTO_INCREMENT flag set for one
of them (ID).
By de
At 17:15 +0100 1/30/02, Andreas Schoelver wrote:
>Hi there
>
>We have some table used as sequences.
>They only have 2 columns (ID, PID), with the AUTO_INCREMENT flag set
>for one of them (ID).
Is the ID column one of the integer types?
>By default the tables are empty!
>
Hi there
We have some table used as sequences.
They only have 2 columns (ID, PID), with the AUTO_INCREMENT flag set for one of them
(ID).
By default the tables are empty!
The increment process is done by inserting a new record with a random
value for the non-auto_increment column.
After that
ble free value.
MD> -Original Message-
MD> From: Christopher Thompson [mailto:[EMAIL PROTECTED]]
MD> Sent: 23 January 2002 22:29
MD> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
MD> Subject: Re: Can Anyone explain / help with auto_increment fields.
MD> At 10:23 PM 1/23/
thanks a simple but effective explination.
-Original Message-
From: Christopher Thompson [mailto:[EMAIL PROTECTED]]
Sent: 23 January 2002 22:29
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Can Anyone explain / help with auto_increment fields.
At 10:23 PM 1/23/2002 +, you
At 10:23 PM 1/23/2002 +, you wrote:
>Hi,
>
>I have a blank table for some testing.
>
>1 of the fields (the primary key) is an auto_increment and not null.
>
>how and what do I insert into this field to start off the recordsets. also
>once I have set the records going
Hi,
I have a blank table for some testing.
1 of the fields (the primary key) is an auto_increment and not null.
how and what do I insert into this field to start off the recordsets. also
once I have set the records going say to 1, what do I then insert if
anything into this field for the next
On Wednesday 16 January 2002 07:28, Hamlin Nicholas-qa568 wrote:
> Easier yet, when using DBI::mysql, is:
>
> my $IncrementedID = $dbh->{'mysql_insertid'};
>
>
> When executed after the INSERT command.
Does this now work with 64-bit auto-increment fields now in DBI? As of
less than a year ago,
MAIL PROTECTED]
Subject: RE: auto_increment
To answer your second question about how to retrieve the auto_incremented
values:
$dbh->do("SELECT last_insert_id() AS myvalue");
execute the above IMMEDIATELY after inserting the record
-Original Message-
From: Ben Curran [mai
ry 15, 2002 5:59 PM
To: [EMAIL PROTECTED]
Subject: auto_increment
Sorry if this is a newbie question, I've been through the manual, still
can't figure it out.
If one has created a table, with a key using auto_increment, how does one
Insert data into it?
If my table consists of (
Ben Curran wrote:
> If one has created a table, with a key using auto_increment, how does one
> Insert data into it?
Data is automatically inserted for you ;-)
> If my table consists of (inID (primary key, auto incremented), employeeID
> (foreign key) time, date).
> if I
Sorry if this is a newbie question, I've been through the manual, still
can't figure it out.
If one has created a table, with a key using auto_increment, how does one
Insert data into it?
If my table consists of (inID (primary key, auto incremented), employeeID
(foreign key) time, d
On Tue, Jan 08, 2002 at 04:16:49PM -0700, Dan Jordan wrote:
> Hi Jeremy,
>
> I just noticed your name today on the mysql mailing list and
> recognised your name. I'm a new user of MySQL and saw that you will
> soon have a new book out.
Well yes, not the book that you think. :-)
I'm working on
forward to seeing your new book when it comes into print!
Dan Jordan
-Original Message-
From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 08, 2002 3:02 PM
To: Steve Bearss
Cc: MySQL Info
Subject: Re: auto_increment, creating table
On Tue, Jan 08, 2002 at 04:56:52PM -0
Steve,
> what is wrong with this statement?
>
>
> mysql> create table message (messageId AUTO_INCREMENT, timePosted
> VARCHAR(25),
> -> userEmail VARCHAR(30), messagePosted MEDIUMBLOB);
>
> ERROR 1064: You have an error in your SQL syntax near 'AUTO_IN
On Tue, Jan 08, 2002 at 04:56:52PM -0500, Steve Bearss wrote:
>
> what is wrong with this statement?
>
>
> mysql> create table message (messageId AUTO_INCREMENT, timePosted
> VARCHAR(25),
> -> userEmail VARCHAR(30), messagePosted MEDIUMBLOB);
>
> ERROR 10
what is wrong with this statement?
mysql> create table message (messageId AUTO_INCREMENT, timePosted
VARCHAR(25),
-> userEmail VARCHAR(30), messagePosted MEDIUMBLOB);
ERROR 1064: You have an error in your SQL syntax near 'AUTO_INCREMENT,
timePoste
d VARCHAR(25),
userEmail
At 16:52 -0600 1/7/02, Rick Emery wrote:
>I don't know if this is a bug or a feature. Just an observation concerning
>creating MYISAM tables with auto_increment.
>
>CREATE TABLE mytable (myval int auto_increment unique ) AUTO_INCREMENT=9000;
>INSERT INTO mytable VALUES
You can also set the auto_increment start value in the CREATE table:
CREATE TABLE mytable (
myval int auto_increment)
AUTO_INCREMENT=100;
Note that the AUTO_INCREMENT=100 is set outside of the fields' definitions.
However, when you delete all records with "DELETE FROM mytable&quo
I don't know if this is a bug or a feature. Just an observation concerning
creating MYISAM tables with auto_increment.
CREATE TABLE mytable (myval int auto_increment unique ) AUTO_INCREMENT=9000;
INSERT INTO mytable VALUES(NULL);
INSERT INTO mytable VALUES(NULL);
these above INSERTS c
hi.
yes it is possible.
1. Create an new column which has an auto_increment option
2. Insert the first dataset manually as followed:
" INSERT INTO test (auto, char) VALUES ('100', 'Hello World!') "
3. From there on your auto column will count starting from
Manish,
If you manually insert a record with a value of 100 in the auto_increment
field, then it will work from then on.
If there is a way to create the table telling the value to start at 100,
then I don't know what it is.
Hope this is a help
John Lodge
-Original Message-
Hi
Is it possible auto_increment start 100 instead of 1 .
for example
create table a
( a int(10) primary key auto_increment 100);
Manish Mehta
E-mail: [EMAIL PROTECTED]
-
Before posting, please check:
http
I have the ID column auto_incrementing and I don't want to change that.
Newbie that I am, I tried to add auto_increment to another column and
failed.
Is there any way to have a field other than the ID field increment by a
set value?
create table test (
ID mediumint(9) NOT
Hello MySQL developers
please add a
ALTER TABLE xyz eternal_auto_increment=1;
that forces the auto_increment column to increment regardless of which
table type I use and how I delete my columns. As long as there is a way
to reset the column somehow (by setting it to -1 or so) I would
> Hi all,
> I have a question:
> I made a table with a field that is auto_increment. This field I made to be
> the primary key.
> In my opinion an auto_increment field should fill itself, without the
> intervention of the user.
> So if I have a table like:
> f1,f2 --
Hi all,
I have a question:
I made a table with a field that is auto_increment. This field I made to be
the primary key.
In my opinion an auto_increment field should fill itself, without the
intervention of the user.
So if I have a table like:
f1,f2 --field names, where f1 is auto_increment
I knew that if record at the Largest number of index being delete, the
number will be reused, but i have a question:
what happen if i delete the record which the index number is between the
largest and the smallest, let say "i have 3 records within my table, by some
reason, i got to delete the re
If the colum is set to unique, it will fill in 2. If not, it'll
automatically goto 4 (or vice versa if I'm mistaken).
> -Original Message-
> From: Jack [mailto:[EMAIL PROTECTED]]
> Sent: November 23, 2001 7:46 AM
> To: Mysql List
> Subject: Question on auto_incre
gt; > will it leave a index gap between or it will move the record of index 3 up
> > to index 2???
You're both wrong. You should test it, and see for yourselves that
unless you're using the old and obsolete ISAM table format,
auto_increment values are NEVER reused. This, of course,
401 - 500 of 692 matches
Mail list logo