mysql@lists.mysql.com
- Original Message -
From: Sebastian Mendel <[EMAIL PROTECTED]>
To: Richard <[EMAIL PROTECTED]>
Cc:
Sent: Wednesday, October 31, 2007 3:11 PM
Subject: Re: Inserting a value in an autoincrement list?
> Richard schrieb:
> > I want to have a list
Richard schrieb:
> I want to have a list of titles to which I can add new ones either at
> the end of the list or in a chosen position so I can choose what order
> they show up in.
>
> The first solution that I thought of was to add one to all of the
> position values heigher than the position I w
Hello,
I'm programming with PHP+Mysql a CMS system to easily update my site.
I want to have a list of titles to which I can add new ones either at
the end of the list or in a chosen position so I can choose what order
they show up in.
The first solution that I thought of was to add one to all
Grant Griffith wrote:
I am trying to add an autoincrement field to a table that already exists
and I keep receiving errors when trying to do it. Can someone point me
in the right direction on how I can do this? I have access via Webadmin
and phpMyAdmin, so I can try it however I need to
IQUE KEY id (id),
KEY dir_users (dir),
KEY seminar_users (seminar),
KEY user_lvl_idx (level)
);
- Original Message -
From: Randy Paries <[EMAIL PROTECTED]>
To: mysql@lists.mysql.com
Sent: Wednesday, November 1, 2006 9:23:55 PM GMT-0500 US/Eastern
Subject: help trying to add an autoin
default '',
seminar int(11) NOT NULL default '0',
getnewsletter int(11) default '0',
PRIMARY KEY (uname),
KEY uname_users (uname),
KEY dir_users (dir),
KEY seminar_users (seminar),
KEY user_lvl_idx (level)
) TYPE=MyISAM;
I want to add an autoincrement field
when i f
- Original Message -
From: "David T. Ashley" <[EMAIL PROTECTED]>
To:
Sent: Saturday, April 22, 2006 12:53 AM
Subject: How to Find Most Recent Autoincrement Index Assigned???
I'm using PHP, and I sometimes INSERT new records in a table. MySQL
assigns
a new au
-+
> | 5 |
> ++
> 1 row in set (0.00 sec)
>
> So it appears you can use either of the three variables
> above to achieve the same effect.
>
> Regards
>
> Keith
>
> On Sat, 22 Apr 2006, Michael Stassen wrote:
>
> > To: David T
eith
On Sat, 22 Apr 2006, Michael Stassen wrote:
> To: David T. Ashley <[EMAIL PROTECTED]>
> From: Michael Stassen <[EMAIL PROTECTED]>
> Subject: Re: How to Find Most Recent Autoincrement Index Assigned???
>
> David T. Ashley wrote:
> > I'm using PHP, and
David T. Ashley wrote:
I'm using PHP, and I sometimes INSERT new records in a table. MySQL assigns
a new autoincrement int field on each INSERT ... nothing surprising there.
It goes 1, 2, 3, etc.
What query can I use to find out what value this int autoincrement assigned
field was? I cou
I'm using PHP, and I sometimes INSERT new records in a table. MySQL assigns
a new autoincrement int field on each INSERT ... nothing surprising there.
It goes 1, 2, 3, etc.
What query can I use to find out what value this int autoincrement assigned
field was? I could of course SELECT bas
On Thu, 23 Mar 2006 [EMAIL PROTECTED] wrote:
>
> To: saf <[EMAIL PROTECTED]>
> From: [EMAIL PROTECTED]
> Subject: Re: Question about autoincrement ID
>
> One important thing to remember: You should not let UI
> design requirements dictate your DB design. Most
[EMAIL PROTECTED] (saf) wrote on 03/23/2006 11:10:04 AM:
> On Thu, Mar 23, 2006 at 11:04:55AM -0500, [EMAIL PROTECTED] wrote:
> > [EMAIL PROTECTED] (saf) wrote on 03/23/2006 10:50:10 AM:
> >
> > The short answer is "no". The Record #2 already existed. It's current
> > status is "deleted". If yo
>So I must do a big SELECT and then check my self every time (for each
INSERT),
>which IDs are free?
No, you just ignore "deleted" IDs.
What's the point?
Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog
On Thu, Mar 23, 2006 at 04:17:44PM +, [EMAIL PROTECTED] wrote:
> Lots of ways round this. Instead of deleting records, add a boolean
> "deleted" flag. All selects then need to add "and deleted = 0". But you can
> find a (random) deleted row with "select id from table where deleted = 1
> limit 1
[EMAIL PROTECTED] (saf) wrote on 23/03/2006 16:10:04:
> On Thu, Mar 23, 2006 at 11:04:55AM -0500, [EMAIL PROTECTED] wrote:
> > [EMAIL PROTECTED] (saf) wrote on 03/23/2006 10:50:10 AM:
> >
> > The short answer is "no". The Record #2 already existed. It's current
> > status is "deleted". If you h
On Thu, Mar 23, 2006 at 11:04:55AM -0500, [EMAIL PROTECTED] wrote:
> [EMAIL PROTECTED] (saf) wrote on 03/23/2006 10:50:10 AM:
>
> The short answer is "no". The Record #2 already existed. It's current
> status is "deleted". If you had other tables that linked their data to
> record #2 and you cre
[EMAIL PROTECTED] (saf) wrote on 03/23/2006 10:50:10 AM:
> Hi,
>
> I have a question about autoincremend id:
> If I have an autoincrement id set on my first column field of my
> table and I have the
> following entries:
> 1
> 3
>
> And then I make a INSERT INTO
Hi,
I have a question about autoincremend id:
If I have an autoincrement id set on my first column field of my table and I
have the
following entries:
1
3
And then I make a INSERT INTO foobar VALUES(''); , the next field would be
automatically 4:
1
3
4
Is there a possibility to take
In the last episode (Feb 06), David T. Ashley said:
> I remember in MySQL that you can define an integer table field as
> AUTOINCREMENT and UNIQUE (I might have the specific keywords wrong,
> but everyone will know what I mean).
>
> In the life of a database where there are frequen
I remember in MySQL that you can define an integer table field as
AUTOINCREMENT and UNIQUE (I might have the specific keywords wrong, but
everyone will know what I mean).
In the life of a database where there are frequent additions and
deletions, 2^32 isn't that large of a number.
Whe
quot;Salvatore Celsomino" <[EMAIL PROTECTED]> wrote:
>
> >Hi,
>
> >it is possible to create a field autoincrement for year.
>
> >example:
>
> >1/2005
>
> >2/2005
>
> >...
>
> >10500/2005
>
> >new yea
Hello.
This should be possible with triggers. See:
http://dev.mysql.com/doc/refman/5.0/en/triggers.html
"Salvatore Celsomino" <[EMAIL PROTECTED]> wrote:
>Hi,
>it is possible to create a field autoincrement for year.
>example:
>1/2005
>2/
2005/12/28, Salvatore Celsomino <[EMAIL PROTECTED]>:
> Hi,
> it is possible to create a field autoincrement for year.
> example:
> 1/2005
> 2/2005
> ...
> 10500/2005
> new year--
> 1/2006
> 2/2006
>
>
This could be of interes
Hi,
it is possible to create a field autoincrement for year.
example:
1/2005
2/2005
...
10500/2005
new year--
1/2006
2/2006
alue present in the column with a value higher than the
unused values, those values won't be reused.
Does it mean that the autoincrement values of deleted records will
be reused only if ALL records are deleted and then server restarted??
All records with values higher than the deleted r
Now when i restart my server, will these values of 5, 7 and 8 be
> reused??
>
> Does it mean that the autoincrement values of deleted records will be reused
> only if ALL records are deleted and then server restarted??
>
> From docs " Note that you may see ga
stay at 11
until the server is shutdown at which point it will revert to 1!!!""
Now if i have records 1 to 10 and i delete some records in between, say,
5, 7, 8. Now when i restart my server, will these values of 5, 7 and 8 be
reused??
No.
Does it mean that the autoincrement va
er is shutdown at which
point it will revert to 1!!!""
Now if i have records 1 to 10 and i delete some records in between , say, 5, 7,
8. Now when i restart my server, will these values of 5, 7 and 8 be reused??
Does it mean that the autoincrement values of deleted records will be
Le samedi 20 août 2005 à 13:53 -0700, Devananda a écrit :
Hi Devananda,
> In short, it sounds like you should be able to simply copy the
> auto_increment field data from your old DBMS into MySQL, and continue to
> use it as such, without problem. Have you tried this in a test
> environment yet
lue fields in FMPro that
didn't export well. However, the real problem that I have is that FMPro
allows you to use multiple autoincrement fields in the same table.
The mysql server I've migrated to is at version 4.0.23. The
autoincrement fields were exported as text and are unfortunatel
hat
didn't export well. However, the real problem that I have is that FMPro
allows you to use multiple autoincrement fields in the same table.
The mysql server I've migrated to is at version 4.0.23. The
autoincrement fields were exported as text and are unfortunately not
sequential (in ot
nt to
have _one and only_ root category)?
> -Original Message-
> From: Martijn Tonies [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 10, 2005 2:31 PM
> To: Denis Gerasimov; [EMAIL PROTECTED]; 'MySQL General List'
> Subject: Re: How to specify autoincrement pr
> > > One simple question... AFAIK I can specify value for an autoincrement
> > > primary key (int) when inserting a record like this:
> > >
> > > INSERT INTO `tablename` (`id`, `name`) VALUES (1, 'test')
> > >
> > > But it do
>
> >
> > Hello,
> >
> > One simple question... AFAIK I can specify value for an autoincrement
> > primary key (int) when inserting a record like this:
> >
> > INSERT INTO `tablename` (`id`, `name`) VALUES (1, 'test')
> >
> > Bu
"Denis Gerasimov" <[EMAIL PROTECTED]> wrote on 10/02/2005 10:59:11:
>
> Hello,
>
> One simple question... AFAIK I can specify value for an autoincrement
> primary key (int) when inserting a record like this:
>
> INSERT INTO `tablename` (`id`, `name`) VALUES
Hello,
One simple question... AFAIK I can specify value for an autoincrement
primary key (int) when inserting a record like this:
INSERT INTO `tablename` (`id`, `name`) VALUES (1, 'test')
But it doesn't work for id = 0. Why?
I would like to use some primary key values for speci
quot;Frank Sonntag" <[EMAIL PROTECTED]>
> To: "mysql@lists.mysql.com"
> CC:
> Subject: are autoincrement values not always increasing in innodb?
> Sent: Mon, 27 Dec 2004 00:45:37 GMT
> Received: Mon, 27 Dec 2004 00:49:46 GMT
> Read: Tue, 28 Dec 2004 10:38:11
I am aware of that.
But from my experience MySQL returns the the rows in the order that you
inserted them.
Assuming this is the case, I was wondering if the result I have seen means
that the order of autoincrement values does not correspond to the order in
which inserts are done.
Frank
On
Hi,
does InnoDB guarantee that the values of an autoincrement column do always
increase?
What happened to me is that a select * from my_table returns something like
id | ...
10
11
5
12
13
where id is defined as int(10) unsigned NOT NULL auto_increment
and is the primary key of the
You will have to call the last_insert_id() function in order to obtain the
autoincrement value.
-Original Message-
From: dan orlic
To: [EMAIL PROTECTED]
Sent: 8/25/04 2:26 PM
Subject: autoincrement question
question:
I have an insert statement that has a null for the value of the
question:
I have an insert statement that has a null for the value of the
primary key, id, since that value is also a
auto-increment field. The problem i am running into is I need that Id
further down the road for map tables, but I have no idea
what the id is, since it is in fact, autoincremen
Paul Wallace wrote:
Hello,
May I specify a column to auto increment in the Control Center UI,
either on or after creation?
thanks
Paul.
Yes.
In the table editor, there should be a 'notebook' ( multiple page thing
) down the bottom of the window. The first page is called 'field
properties'.
Hello,
May I specify a column to auto increment from within the Control
Center UI, either on or after creation?
thanks
Paul.
Hello,
May I specify a column to auto increment in the Control Center UI,
either on or after creation?
thanks
Paul.
AM
To: MySQL Mailing List
Subject: autoincrement problem
Hi all,
What will be the best way to implement auto increment field. I dont want
to use auto increment feature, as it only appends the numbers but
doesn't check for the values deleted. Suppose, following are the values
in table
1abc
MySQL Mailing List"
<[EMAIL PROTECTED]>
Sent: Saturday, June 12, 2004 3:53 PM
Subject: Re: autoincrement problem
> Nitin wrote:
>
> >Hi all,
> >
> >What will be the best way to implement auto increment field. I dont want
to use auto increment feature, as it on
.
9xyz
now if 2nd and 3rd rows are deleted, an autoincrement field will still assign 10, 11,
12 to the new values, while I want it to assign the values deleted from the table
first.
What will be the best way to implement it?
Thanks in advance
Nitin
You shouldn't use text fields as pr
ow if 2nd and 3rd rows are deleted, an autoincrement field will still assign 10, 11,
12 to the new values, while I want it to assign the values deleted from the table
first.
What will be the best way to implement it?
Thanks in advance
Nitin
#x27;Arthur Radulescu'" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Subject: RE: autoincrement column
Date: Thu, 8 Apr 2004 12:50:58 -0700
Try truncate table. It essentially drops the table and recreates it.
--
DVP
> -Original Message-
> From: Arthur Radulescu [mail
Try truncate table. It essentially drops the table and recreates it.
--
DVP
> -Original Message-
> From: Arthur Radulescu [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 08, 2004 10:36 AM
> To: [EMAIL PROTECTED]
> Subject: autoincrement column
>
> Before switching
Before switching to version 4.0.18 of MySQL the command "delete from table"
was also reseting the autonincrement column value... It seems that this is
not happening anymore after we have installed this version...
Any idee about this problem? Is there any other way to reset this?
Arthur
--
MyS
14.5.3.1 SET Syntax.
>From here: http://www.mysql.com/doc/en/ALTER_TABLE.html
On Thu, 01 Apr 2004, Amit Wadhwa
wrote: > > Hi All,
> I was wondering if there was a way in mySQL wherein I tell the
> autoincrement spec where to start from?
> Eg. Autoincrement startfrom 1
>
http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html
this should sort you out..
Regards
Joe
-Original Message-
From: Amit Wadhwa [mailto:[EMAIL PROTECTED]
Sent: 01 April 2004 23:33
To: [EMAIL PROTECTED]
Subject: question on autoincrement
Hi All,
I was wondering if there was a way in
Hi All,
I was wondering if there was a way in mySQL wherein I tell the
autoincrement spec where to start from?
Eg. Autoincrement startfrom 1
And the values go in as:
10001..10002 and so on,.. instead of 1..2..3..
..like sequencing in oracle
Any help is appreciated,
Thanks
Amit Wadhwa
Data
On Tue, Jan 20, 2004 at 01:25:34PM +0100, Tobias Asplund wrote:
> On Tue, 20 Jan 2004, Marco Paci wrote:
>
> > Since the process of inserting a new record and reading its PK field
> > value is a two step process implemented by:
> > 1) insert into tablename (columnnames) values()
> > 2) select
On Tue, Jan 20, 2004 at 12:35:07PM +0100, Marco Paci wrote:
> Environment OS:windows 2003 server, PLATFORM:.NET framework 1.1,
> LANGUAGE:C#, .NET PROVIDER:MySQLDriverCS
>
> In an application I'm developing on top of mysql, I wanna use as primary
> key for tables an autoincre
* Tobias Asplund
> On Tue, 20 Jan 2004, Marco Paci wrote:
>
> > Since the process of inserting a new record and reading its PK field
> > value is a two step process implemented by:
> > 1) insert into tablename (columnnames) values()
> > 2) select last_insert_id()
> > ,and since because of the a
Use a different connection for each thread. last_insert_id() is isolated per
connection.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
On Tue, 20 Jan 2004, Marco Paci wrote:
> Since the process of inserting a new record and reading its PK field
> value is a two step process implemented by:
> 1) insert into tablename (columnnames) values()
> 2) select last_insert_id()
> ,and since because of the architecture of my application
Environment OS:windows 2003 server, PLATFORM:.NET framework 1.1,
LANGUAGE:C#, .NET PROVIDER:MySQLDriverCS
In an application I'm developing on top of mysql, I wanna use as primary
key for tables an autoincrement field.
Every time I insert a new record I need to read the value assigned to
t
It is my understanding that at least through 4.0.14, INNODB does not
support using autoincrement on the last field in a multi field primary
key.
i.e. if a table has a primary key of three fields like
cpny_ID, acct_ID, list_ID
in MYISAM you can add the autoincrement attribute to
On Tuesday, August 12, 2003, at 09:46 PM, Andrew Rothwell wrote:
Hello List,
I have a movies database, that I had an autoincrementing field for
counting purposes.What I did though was remove some of the rows out of
the table, now my table is reporting an incorrect number of movies
listed.What I a
Hello List,
I have a movies database, that I had an autoincrementing field for
counting purposes.What I did though was remove some of the rows out of
the table, now my table is reporting an incorrect number of movies
listed.What I am trying to do is after is have done the following
command
Mysql>
On Tuesday, August 12, 2003, at 09:59 PM, otherguy wrote:
On Tuesday, August 12, 2003, at 09:46 PM, Andrew Rothwell wrote:
Hello List,
I have a movies database, that I had an autoincrementing field for
counting purposes.What I did though was remove some of the rows out of
the table, now my tabl
On Wednesday 26 March 2003 08:25, you wrote:
> > A programmer just asked me about a possible race condition,
> > and I didn't know what to answer:
> >
> > If I insert a line using autoincrement, then ask for last_insert_id()
> > am I guaranteed to get the same I
> A programmer just asked me about a possible race condition,
> and I didn't know what to answer:
> If I insert a line using autoincrement, then ask for last_insert_id()
> am I guaranteed to get the same ID I just inserted?
Yes
> It seems that another program could be ins
Hi,
On Wed, Mar 26, 2003 at 03:17:42PM +0100, Steve Rapaport wrote:
> A programmer just asked me about a possible race condition,
> and I didn't know what to answer:
>
> If I insert a line using autoincrement, then ask for last_insert_id()
> am I guaranteed to get the sam
A programmer just asked me about a possible race condition,
and I didn't know what to answer:
If I insert a line using autoincrement, then ask for last_insert_id()
am I guaranteed to get the same ID I just inserted?
It seems that another program could be inserting at almost the same
time
At 22:28 -0600 3/21/03, Paul DuBois wrote:
At 20:04 -0800 3/21/03, Todd Cary wrote:
I
would like to avoid the necessity of specifying all of the fields -
instead use the following syntax:
INSERT INTO teachers VALUES
(1,12345,NULL,'Harry','Smith','707-773-4523',2',...
However, the first field is a
At 20:04 -0800 3/21/03, Todd Cary wrote:
I would
like to avoid the necessity of specifying all of the fields -
instead use the following syntax:
INSERT INTO teachers VALUES
(1,12345,NULL,'Harry','Smith','707-773-4523',2',...
However, the first field is an autoincrementing field. Will MySQL
ignor
I would
like to avoid the necessity of specifying all of the fields -
instead use the following syntax:
INSERT INTO teachers VALUES
(1,12345,NULL,'Harry','Smith','707-773-4523',2',...
However, the first field is an autoincrementing field. Will MySQL
ignore my value and overwrite it with the "aut
> The primary key (message_id)is a UNSIGNED BIGINT,
> Which is supposed to be 64 bit, with autoincrement.
> The each row is deleted as soon as it is fetched
> By the client, and also after the expiry of a period
> (~30 days).
> 64 bits does provide a large number, but there
At 1:19 +0530 3/7/03, Jeethu Rao wrote:
Hi,
I'm using a mysql table to store small messages
in a p2p messaging server.
The primary key (message_id)is a UNSIGNED BIGINT,
Which is supposed to be 64 bit, with autoincrement.
The each row is deleted as soon as it is fetched
By the client, and
Hi,
I'm using a mysql table to store small messages
in a p2p messaging server.
The primary key (message_id)is a UNSIGNED BIGINT,
Which is supposed to be 64 bit, with autoincrement.
The each row is deleted as soon as it is fetched
By the client, and also after the expiry of a period
(~30
Hallo list!
I have an autoincrement field (+others of coarse) in myISAM table. When I
try to insert values with queries everything works fine, but when I try to
do it with Borland C++ builder 6's TSQLClientDataSet (dbExpress) it throws
an exception that the field's value must be set. It
Auto_Increment will increment the last_INSERT_ID
(which in your case is 10)... so the num field of the
new entry will be 11.
--- Robert Mena <[EMAIL PROTECTED]> wrote:
> Hi, I have been using autoincrement fields for some
> time but was wondering how does it work in some
> "
Hi.
On Fri 2003-01-31 at 06:48:45 -0800, [EMAIL PROTECTED] wrote:
> Hi, I have been using autoincrement fields for some
> time but was wondering how does it work in some
> "special" situations.
Most of this depends on which MySQL version you use and which table
type, unfortuna
On Fri, Jan 31, 2003 at 06:48:45AM -0800, Robert Mena wrote:
> Hi, I have been using autoincrement fields for some
> time but was wondering how does it work in some
> "special" situations.
>
> Ex. suppose I have an autoincrement field called num
> and the last one ha
On Fri, 2003-01-31 at 10:48, Robert Mena wrote:
> Hi, I have been using autoincrement fields for some
> time but was wondering how does it work in some
> "special" situations.
>
> Ex. suppose I have an autoincrement field called num
> and the last one has value of 1
Hi, I have been using autoincrement fields for some
time but was wondering how does it work in some
"special" situations.
Ex. suppose I have an autoincrement field called num
and the last one has value of 10.
I delete the last on and insert a new one. Which
value will it have ? 10 or
InnoDB is losing records, there are gaps in autoincrement
sequence
From: Robert Wunderer
Date: 24 Jan 2003 12:53:04 +0100
Hi.
- Original Message -
> InnoDB appears to be losing records.
>
> The ve
Hi!
- Original Message -
From: "My Deja" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Thursday, January 16, 2003 12:39 PM
Subject: InnoDB is losing records, there are gaps in autoincrement sequence
> InnoDB appears to be losing records.
>
>
InnoDB appears to be losing records.
The version I am using is 3.32.53 in Windows 2000.
Gaps are appearing in the autoincrement sequence when
the application does not permit record deletions.
Records disappear although they have been retrieved
for printing earlier.
Does anyone know how this
Stefan,
- Original Message -
From: ""Stefan Sturm"" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Sunday, December 01, 2002 1:49 PM
Subject: MySQL and Autoincrement
> Hello,
>
> when I use autoincrement on a field, now can I start the
Hello.
On Sun 2002-12-01 at 12:47:42 +0100, [EMAIL PROTECTED] wrote:
> Hello,
>
> when I use autoincrement on a field, now can I start the count whith
> 100?
See http://www.mysql.com/doc/en/ALTER_TABLE.html (end of page)
Bye,
Benjamin.
--
[EMA
Hello,
when I use autoincrement on a field, now can I start the count whith
100?
Thank you,
Stefan Sturm
---
sql, query
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http
A month or two back I posted a question asking if an AutoIncrement
column in a multicolumn index was supposed to work. At the time, I had
accidently produced the intended effect, and couldn't duplicate it.
Today, while browsing the MySQL docs, I discovered how to do it
properly, and th
Alec,
Friday, August 09, 2002, 2:01:10 PM, you wrote:
AC> If I insert a number, say X, of records using a single statement of the
AC> form
AC> INSERT INTO table VALUES (...), (...), ..., (...)
AC> then retrieve the LAST_INSERT_ID, say Y, is it reasonable to assume that
AC> the records will
If I insert a number, say X, of records using a single statement of the
form
INSERT INTO table VALUES (...), (...), ..., (...)
then retrieve the LAST_INSERT_ID, say Y, is it reasonable to assume that
the records will be numbered contiguously from Y-X+1 to Y, even in a
multi-user environment?
Hmm, this all sounds indeed like a terrific feature .. if it would work !
So, I decided to try it and just see what'll happen. I did the following
things:
* first I created a table:
mysql> create table autoIncrement (
-> id int(11) NOT NULL AUTO_INCREMENT,
-> thingie v
filter: sql,query
I did some tests recently on a two column primary key, one of which was
an autoincrement column. It worked nicely, maintaining a separate
increment for every unique value in the second column. I was ecstatic,
as this was exactly what I need for some tables I'm desi
In the last episode (Jan 09), D Woods said:
> I'm a novice at setting up a mysql database and don't know the answer to
> this. I usually set up my primary keys as autoincrementing ID fields. Now I
> need to have a primary key that isn't an autoincrementing field as I want to
> store the CFTOKEN an
yes, you can
-Original Message-
From: D Woods [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 09, 2002 4:02 PM
To: [EMAIL PROTECTED]
Subject: primary key that doesn't autoincrement
I'm a novice at setting up a mysql database and don't know the answer to
this. I us
I'm a novice at setting up a mysql database and don't know the answer to
this. I usually set up my primary keys as autoincrementing ID fields. Now I
need to have a primary key that isn't an autoincrementing field as I want to
store the CFTOKEN and use it as the primary key. Can I not have a
non-au
I have a problem with the autoincrement. I have a table with a lot of
registers, and the table have a field with auto_increment, but know this
field don`t make the increment and always return to us the same number,
one more big that the number that the autoincrement have to return.
I have pass
Max writes:
> >Description:
> I am using russian values(cp1251 charset) for ENUM items.
> Here is an example how to damage ID field by query to change
> F_Category Enum.
> >How-To-Repeat:
> # Create tableA with ID field.
> CREATE TABLE tableA (
> ID int(11) NOT NULL auto
Try to alter F_Category field
ALTER TABLE tableA CHANGE COLUMN F_Category F_Category ENUM('Bug',
'tmp_sync_1005859699', 'Âîïðîñ ïîëüçîâàòåëÿ', 'Îáùèé âîïðîñ', 'Ðàñøèðåííûé çàïðîñ',
'Îøèáêà íà WEB ñåðâåðå', 'Îøèáêà ïîëüçîâàòåëÿ') N
LAST_INSERT_ID() is what you need.
-Original Message-
From: ROGGER ALEXIS VASQUEZ MARTINEZ [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 4:45 PM
To: [EMAIL PROTECTED]
Subject: How to Get the New Number inserted in a AutoIncrement Field
I know that this is a old question
http://www.mysql.com/doc/G/e/Getting_unique_ID.html
HTH,
/Rob
>I know that this is a old question, but
>I really need to know how can I get the
>number that Mysql use in a autoincrement field
>of a record I just inserted ...
>Is there any function like LAST_INSERTED or
>s
1 - 100 of 128 matches
Mail list logo