ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiran vuppla <kirankumar_vup...@yahoo.com>
Subject Finding the next primary key value.
Date Thu, 10 Jul 2008 14:00:31 GMT
 I would like to insert data in to database using IBatis <insert> but I am not sure
what value I need to use for "primary key" column as I am not what is the next primary key
value. Can you some one let me know how to find the nextPrimaryKey Value in a table? Here
sessionID is primarykey for which I need to find the next unique value.
<insert id="insertSession" parameterClass="com.java.red.session">
  insert into PPSession (sessionID, name, createdOn, createdBy) values
   ( sessionID, #name#, #createdOn#, #createdBy#)
Thanks in advance.

View raw message