Hi,
I have a table 'test'
+-+--+--+-+---
++
| Field | Type | Null | Key | Default |
Extra |
+-+--+--+-+---
++
| id | int(11) | NO |
Hello,
you can do it in two ways I guess:
one is to do a second select (which you don't want):
SELECT LAST_INSERT_ID().
another way is to use java.sql.Statement.RETURN_GENERATED_KEYS
when you create your Statement, something along these lines:
java.sql.PreparedStatement pstmt =
myconnec
Hello Everybody,
i want to read the latest value of a autoincrement column from a java
program. How can i do this? i want to do this in a single query insertion,
is it possible?
Hello.
As far as I see mysqldump doesn't support this feature. Here is the
thread where people discuss this issue, may be it will be interesting
for you. See:
http://lists.mysql.com/mysql/79914
Jacques Brignon <[EMAIL PROTECTED]> wrote:
> I have not identified which options to use
I have not identified which options to use to have the current value of the
AUTO_INCREMNT included in the dump file.
Is this possible?
--
Jacques Brignon
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
om: Tobias Asplund <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Mike Mapsnac <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: Increment value Date: Tue, 20 Jan 2004 23:36:22 +0100 (CET)
On Tue, 20 Jan 2004, Mike Mapsnac wrote:
In the table value login_count is int(4)
I know that. I'm lookign for mysql function that will increment the value.
From: Tobias Asplund <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Mike Mapsnac <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: Increment value Date: Tue, 20 Jan 2004 23:36:22 +0100 (CE
On Tue, 20 Jan 2004, Mike Mapsnac wrote:
> In the table value login_count is int(4). For example if value login_count
> equal to 3 and each time user login I want to increment by one.
>
> update customer set login_count='how?" where id=12121212;
SET login_count = login_count + 1
--
MySQL Gene
In the table value login_count is int(4). For example if value login_count
equal to 3 and each time user login I want to increment by one.
update customer set login_count='how?" where id=12121212;
What function I should use in order to icrement the value?
__
At 21:00 -0500 12/29/02, Carlin Anderson wrote:
I have a number of databases installed under mysql 3.23 and 4.0, and
will need to occasionally re-initialize certain tables. Can I
re-set auto-increment fields within those tables?
You can drop and re-create the tables. This will work for any ta
I have a number of databases installed under mysql 3.23 and 4.0, and will need to
occasionally re-initialize certain tables. Can I re-set auto-increment fields within
those tables?
Thanks
Carlin Anderson
-
Before posting, ple
k
-Jim
Devi Annisetty wrote:
> Hi
>
> I need to insert the same auto increment value in 2 different tables
> simultaneously.
> I am new to the MySQL.Is there any function which helps for this type of
> manipulations?
> Or I need to store the value in host variable and update th
Hi
I need to insert the same auto increment value in 2 different tables
simultaneously.
I am new to the MySQL.Is there any function which helps for this type of
manipulations?
Or I need to store the value in host variable and update the tables with
this host variable?
Greatly appreciate you
" <[EMAIL PROTECTED]>
>To: "Harrison C. Fisk" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>, "Paul
>DuBois" <[EMAIL PROTECTED]>
>Subject: Re: Get the next AUTO INCREMENT value for a column
>Date: Sun, 5 May 2002 14:06:43 -0400
>
>IMO th
t you start adding rows to child tables. And that
value you can easily obtain.
Arthur
- Original Message -
From: "Paul DuBois" <[EMAIL PROTECTED]>
To: "Harrison C. Fisk" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, May 04, 2002 12:34 PM
Sub
riginal Message -
>From: "Paul DuBois" <[EMAIL PROTECTED]>
>To: "Son Nguyen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>Sent: Saturday, May 04, 2002 12:16 PM
>Subject: Re: Get the next AUTO INCREMENT value for a column
>
>
>> At 9:0
t; <[EMAIL PROTECTED]>
To: "Son Nguyen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, May 04, 2002 12:16 PM
Subject: Re: Get the next AUTO INCREMENT value for a column
> At 9:01 -0700 5/4/02, Son Nguyen wrote:
> > CREATE table test1 (ID int NOT
");
>
> DELETE from test1 where ID=2;
>
> How can obtain the CURRENT value of next ID AUTO INCREMENT value
> (which is 3 right now)
I don't know if you can, but you shouldn't want to try... :)
Unless you have a single user application, the future value of any field
;test2", "value2");
>
> DELETE from test1 where ID=2;
>
> How can obtain the CURRENT value of next ID AUTO INCREMENT value
>(which is 3 right now)
>
>
>
>
> Son Nguyen
&g
;
How can obtain the CURRENT value of next ID AUTO INCREMENT value
(which is 3 right now)
Son Nguyen
mysql, query
__
Do You Yahoo!?
Yahoo! Health - your guide to hea
On Saturday, 13. April 2002 23:31, Alex Duffield wrote:
> Ignore this ---Get around silly filter -- sql,query
>
> >> Description:
>
> Using myisamchk -A=nn reports success but does nothing!
>
>
> I found this problem is being had by many, but have never come across a
> solution..
>
> Is there so
At 14:31 -0700 4/13/02, Alex Duffield wrote:
>Ignore this ---Get around silly filter -- sql,query
>>> Description:
>Using myisamchk -A=nn reports success but does nothing!
-Ann for the short form (no = unless you use the long option)
>
>
>I found this problem is being had by many, but have neve
Ignore this ---Get around silly filter -- sql,query
>> Description:
Using myisamchk -A=nn reports success but does nothing!
I found this problem is being had by many, but have never come across a
solution..
Is there some way to manually set the auto_increment or not??!!!?
--
Alex Duffield
C
23 matches
Mail list logo