List:MySQL and Java« Previous MessageNext Message »
From:Jon Frisby Date:July 19 2002 6:25pm
Subject:RE: returning identity field from a select statement
View as plain text  
I see.  Perhaps I was thinking of the Perl DBI driver for MySQL then...
Thanks for the correction.

-JF


> -----Original Message-----
> From: Mark Matthews [mailto:mmatthew@stripped]
> Sent: Thursday, July 18, 2002 8:55 PM
> To: Jon Frisby; Jeff Kilbride; java@stripped; MHall@stripped
> Subject: Re: returning identity field from a select statement
>
>
>
> ----- Original Message -----
> From: "Jon Frisby" <jfrisby@stripped>
> To: "Jeff Kilbride" <jeff@stripped>; <java@stripped>;
> <MHall@stripped>
> Sent: Thursday, July 18, 2002 10:12 PM
> Subject: RE: returning identity field from a select statement
>
>
> > IIRC, getLastInsertID() is a wrapper for "SELECT
> LAST_INSERT_ID()".  Thus,
> > the latter is generally preferrable because you aren't tying
> your code to
> a
> > particular MySQL JDBC driver...
>
> Not really, because the driver doesn't have to issue a query when you call
> getLastInsertId() (it's passed back as part of the client-server
> protocol).
> Howerver, it is database-specific.
>
> The next version of MM.MySQL will support getGeneratedKeys() fully in all
> types of Statements, and doesn't require a query to do it (so it's faster
> than executeQuery("SELECT LAST_INSERT_ID()")).
>
>     -Mark
>
>
>
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail java-thread4018@stripped
>
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail java-unsubscribe@stripped instead.
>
>

Thread
returning identity field from a select statementMHall16 Jul
  • Re: returning identity field from a select statementJeff Kilbride16 Jul
    • RE: returning identity field from a select statementJon Frisby19 Jul
      • Re: returning identity field from a select statementMark Matthews19 Jul
        • RE: returning identity field from a select statementJon Frisby19 Jul
  • Re: returning identity field from a select statementTim Endres16 Jul
  • Re: returning identity field from a select statementJavier BolaƱos Molina(MCIC)16 Jul
    • Re: returning identity field from a select statementAndrew Houghton16 Jul
Re: returning identity field from a select statementMark Matthews16 Jul
Re: returning identity field from a select statementSteve Forsyth16 Jul
Re: returning identity field from a select statementSteve Forsyth16 Jul
  • Re: returning identity field from a select statementMark Matthews16 Jul