Re: DELETE ... RETURNING

From: Dennis Brakhane <brakhane(at)googlemail(dot)com>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: DELETE ... RETURNING
Date: 2009-07-13 19:51:01
Message-ID: 226a19190907131251m6c3786f5id8e8025f5c53cf66@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Mon, Jul 13, 2009 at 9:44 PM, Thomas Kellerer<spam_eater(at)gmx(dot)net> wrote:
> Statement stmt = connection.createStatement();
> stmt.executeUpdate("delete from person where firstname like 'A%' returning
> id");
>
> Am I missing something or is the "RETURNING" feature not supported by the
> driver?

executeUpdate by definitionem can only return an int, the number of
rows affected.

You probably can use stmt.executeQuery instead

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Kellerer 2009-07-13 20:23:04 Re: DELETE ... RETURNING
Previous Message Thomas Kellerer 2009-07-13 19:44:57 DELETE ... RETURNING