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: Finding the next primary key value.
Date Thu, 10 Jul 2008 14:45:14 GMT
Look at the <selectKey/> tag.

Larry


On Thu, Jul 10, 2008 at 8:00 AM, kiran vuppla
<kirankumar_vuppla@yahoo.com> wrote:
>
>
>  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#)
>
> </insert>
>
>
>
> Thanks in advance.
> KV
>

Mime
View raw message