java, mysql autoincrememnt

From: Dan (fake_at_email.com)
Date: 04/21/04


Date: Tue, 20 Apr 2004 23:25:13 +0100

I am writing a program in java which at some point will insert values
into a mysql table whose primary key auto increments. I need to know
what the value that is used for this new row is.

Does any one have any ideas of how to find this out without having to
search the table imediately after the insertion to find the value that
is has given the new row?

any help would be fantastic
Thanks
Dan



Relevant Pages

  • Re: java, mysql autoincrememnt
    ... >into a mysql table whose primary key auto increments. ... Coaching, problem solving, economical contract programming. ...
    (comp.lang.java.databases)
  • Re: java, mysql autoincrememnt
    ... >> into a mysql table whose primary key auto increments. ... > If you're using Java 1.4, have a look at the getGeneratedKeysmethod on ...
    (comp.lang.java.databases)
  • Re: java, mysql autoincrememnt
    ... On 4/20/2004 15:25, Dan wrote: ... > into a mysql table whose primary key auto increments. ...
    (comp.lang.java.databases)
  • Re: Java and MySql program example ?
    ... > I am trying to learn Java and need an example program with MySql ... > MySql database. ... Database connection established ...
    (comp.lang.java.programmer)
  • Re: mysql vs sqlite vs hsql
    ... My question isabout benchmarks and multiple inserts & ... > I current have a mysql database of approx. ... lemme dispell the very common misconception that java is slow. ...
    (comp.lang.python)