ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Livanov <sergey.liva...@gmail.com>
Subject MySql get primary key error
Date Wed, 22 Apr 2009 23:03:12 GMT
Could you please help me ...
I want to get primary key value after insert a record ( MySQL 3.1... ).
I wrote after insert
   statement insert resultclass=int
      insert into mytable ( fld1, fld2 )
   	   values ( #fld1#, #fld2# )
     select last_insert_id() as value

But the system gives me an error.
What is the problem ?
This construction works well with SQL server ..

Mime
View raw message