Skip site navigation (1) Skip section navigation (2)

Re: getGeneratedKeys() support?

From: Andrew Lazarus <drlaz(at)attglobal(dot)net>
To: Benjamin Shive <bshive(at)comcast(dot)net>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: getGeneratedKeys() support?
Date: 2007-08-30 21:32:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
The current JDBC driver supports the RETURNING clause and it does
exactly what someone would want.

ResultSet rs = statement.executeQuery("INSERT INTO z(myField) VALUES(0)
RETURNING keyName") ;
int key = rs.getInt(1);


In response to

pgsql-jdbc by date

Next:From: Albe LaurenzDate: 2007-08-31 08:22:15
Subject: Re: Retrieving Columns by table-alias
Previous:From: Dominik BruhnDate: 2007-08-30 20:44:38
Subject: Retrieving Columns by table-alias

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group