ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Getting auto-generated keys in mySql
Date Wed, 17 Aug 2005 21:01:25 GMT
M$SQL to MySQL?! Good for you!

SELECT LAST_INSERT_ID()

Larry


PS: I'd use pgsql instead though. ;-)


On 8/17/05, Barnett, Brian W. <brian.barnett@pearson.com> wrote:
> We've been using SQL Server and are moving to mySQL. Can somebody tell me
> how to do this for mySql:
> 
> <selectKey resultClass="int" keyProperty="id">
>         SELECT @@IDENTITY AS id
> </selectKey>
> 
> TIA,
> Brian Barnett
> 
> ****************************************************************************
> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
> ****************************************************************************
>

Mime
View raw message