B Jones
Subject: RE: automatically incrementing an int value
At 11:09 -0500 3/10/03, Douglas B. Jones wrote:
Hi,
Great! This works, I did not use the 'null' and that is
where I had a problem. One other questions: is this atomic?
If I have several processes trying to do this at one time
PROTECTED]; Douglas B Jones
Subject: RE: automatically incrementing an int value
At 11:09 -0500 3/10/03, Douglas B. Jones wrote:
Hi,
Great! This works, I did not use the 'null' and that is
where I had a problem. One other questions: is this atomic?
If I have several processes trying to do
If I understand correctly, you are trying to grep the SQL data file. This
is emphatically not a valid thing to do. The data file is *not* a
representation of the table displayed when you SELECT * from it. For a
start, if you have deleted records and not overwritten them, the blank
space will
PROTECTED]
Cc: Douglas B Jones; [EMAIL PROTECTED]; 'Paul DuBois'
Subject: RE: automatically incrementing an int value
If I understand correctly, you are trying to grep the SQL data file.
This
is emphatically not a valid thing to do. The data file is *not* a
representation of the table displayed
: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 11:29 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Douglas B Jones
Subject: RE: automatically incrementing an int value
At 10:22 -0500 3/12/03, Douglas B. Jones wrote:
Hi,
I just tried the below
On 12 Mar 2003, at 10:22, Douglas B. Jones wrote:
INSERT INTO virus VALUES (91207,'VBS/Kakworm');
INSERT INTO virus VALUES (117623,'VBS/Redlof-A');
As you can see, the numbers (n field) are way to high? Is this a bug
in mysql or n the sql?
It's far more likely to be a bug in your
: Douglas B Jones
Subject: RE: automatically incrementing an int value
On 12 Mar 2003, at 10:22, Douglas B. Jones wrote:
INSERT INTO virus VALUES (91207,'VBS/Kakworm');
INSERT INTO virus VALUES (117623,'VBS/Redlof-A');
As you can see, the numbers (n field) are way to high? Is this a bug
]; Douglas B Jones
Subject: RE: automatically incrementing an int value
At 10:22 -0500 3/12/03, Douglas B. Jones wrote:
Hi,
I just tried the below:
create table virus (
n int auto_increment not null,
name char(128) not null,
primary key(n),
unique(name(100
would not be so resource expensive.
Thanks,
Cheers,
Douglas
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 11:29 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Douglas B Jones
Subject: RE: automatically incrementing an int
At 11:45 -0500 3/12/03, Keith C. Ivey wrote:
On 12 Mar 2003, at 10:22, Douglas B. Jones wrote:
INSERT INTO virus VALUES (91207,'VBS/Kakworm');
INSERT INTO virus VALUES (117623,'VBS/Redlof-A');
As you can see, the numbers (n field) are way to high? Is this a bug
in mysql or n the sql?
It's far
On 12 Mar 2003, at 11:41, Douglas B. Jones wrote:
INSERT INTO virus VALUES (3,'VBS/LoveLet-E');
INSERT INTO virus VALUES (4,'VBS/LoveLet-G');
INSERT INTO virus VALUES (5,'WM97/Myna-C');
I would have expected 3,4,5 to be 3,1,1. I was expecting it to start
from zero each time it got a new
On Wed 2003-03-12 at 11:16:09 -0600, [EMAIL PROTECTED] wrote:
At 11:41 -0500 3/12/03, Douglas B. Jones wrote:
Hi,
I understood replace to only increment n when it matches the
name value.
In that case, you want a primary key on (name,n) with n being
auto_increment.
There are 122,111
Hi,
First, the version: 3.23.49
If I have a table with two elements: name char(128), n int
how do I have it so that n will increment each time?
I take it that name needs to be a primary key. How do I get
n to increment in vaue each time. This is not auto_increment.
I want name to be in the
]
|
| Subject: automatically incrementing an int value
: automatically incrementing an int value
As I read the manual, the REPLACE command will do what you want.
Make the name field UNIQUE, and the number field AUTO_INCREMENT NOT NULL.
Replace dos a delete-if-present, insert. The insert generates a new ID.
See test below, and note two rows affected
To: Douglas B Jones
Cc: [EMAIL PROTECTED]
Subject: Re: automatically incrementing an int value
As I read the manual, the REPLACE command will do what you want.
Make the name field UNIQUE, and the number field AUTO_INCREMENT NOT NULL.
Replace dos a delete-if-present, insert. The insert
16 matches
Mail list logo