CORRECTION

select last_insert_id()

Damn these fat fingers

--- On Fri, 22/1/10, StevenF <ste...@web2.filipowicz.com> wrote:

> From: StevenF <ste...@web2.filipowicz.com>
> Subject: insert going wrong after going from Sybase to MySQL
> To: user-java@ibatis.apache.org
> Date: Friday, 22 January, 2010, 15:19
> 
> Hi All,
> 
> I'm switching the database of an application from Sybase to
> MySQL, but the
> insert statements aren't going well.
> 
> I have this which works for Sybase:
> --------
>     <statement id = "insertChesser"
> parameterClass="nl.chessone40.domain.Chesser"
> resultClass="java.lang.Long">
>         INSERT INTO Chesser
>             (login,
>             password,
>             firstName,
>             lastName,
>             credits)
>         values
>             (#login#,
>             #password#,
>             #firstName#,
>             #lastName#,
>             #credits#)
>         SELECT @@IDENTITY AS value
>     </statement>
> ----------
> 
> The above doesn't work for MySQL, what would I need to
> change to make it
> work for MySQL?
> 
> Any help is very welcome!
> 
> Thanks!
> -- 
> View this message in context: 
> http://old.nabble.com/insert-going-wrong-after-going-from-Sybase-to-MySQL-tp27274795p27274795.html
> Sent from the iBATIS - User - Java mailing list archive at
> Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
> For additional commands, e-mail: user-java-h...@ibatis.apache.org
> 
> 





---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Reply via email to