ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Baeza <roger...@yahoo.com>
Subject selectKey for Informix
Date Wed, 09 Feb 2005 00:26:27 GMT
Hello all

Could any one help me, pls

I'm looking for selectKey sintaxis to get serial value
after inserting any row in tables for informix
database...

I was use getSerial() for ifxStatement JDBC class, but
I moving to iBatis, I can't undertand what is the
correct form tu use selectKey

documentation say:
for oracle 
<selectKey resultClass="int" keyProperty="id" >
SELECT STOCKIDSEQUENCE.NEXTVAL AS ID FROM DUAL
</selectKey>

for sqlServer
<selectKey resultClass="int" keyProperty="id" >
SELECT @@IDENTITY AS ID
</selectKey>

for mysql
<selectKey resultClass="int" keyProperty="id" >
SELECT GET_LAST_ID() AS ID
</selectKey>

Infomix have serial datatype that autogerate ID,
example

Create Table Addrees(
  addressId serial not null primary,
  ....

);



Thanks alote
regards


		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

Mime
View raw message