Re: [GENERAL] output inserted

2012-11-21 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Peter Kroon Sent: Wednesday, November 21, 2012 8:41 AM To: pgsql-general@postgresql.org Subject: [GENERAL] output inserted How to I output the insert in PostgreSQL? DROP TABLE IF EXISTS a_001

Re: [GENERAL] output inserted

2012-11-21 Thread Ryan Kelly
On Wed, Nov 21, 2012 at 02:41:24PM +0100, Peter Kroon wrote: > How to I output the insert in PostgreSQL? > > DROP TABLE IF EXISTS a_001; > CREATE TEMP TABLE a_001( > vl text > ); > DROP TABLE IF EXISTS a_002; > CREATE TEMP TABLE a_002( > vl text > ); > > INSERT INTO a_001 > OUTPUT INSERTED.* INTO

[GENERAL] output inserted

2012-11-21 Thread Peter Kroon
How to I output the insert in PostgreSQL? DROP TABLE IF EXISTS a_001; CREATE TEMP TABLE a_001( vl text ); DROP TABLE IF EXISTS a_002; CREATE TEMP TABLE a_002( vl text ); INSERT INTO a_001 OUTPUT INSERTED.* INTO a_002 --mssql SELECT 'text for insertion'; SELECT vl FROM a_002;