CORRECTION select last_insert_id()
Damn these fat fingers --- On Fri, 22/1/10, StevenF <[email protected]> wrote: > From: StevenF <[email protected]> > Subject: insert going wrong after going from Sybase to MySQL > To: [email protected] > 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: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
