PGSQL returning into in insert statement

From: Chamath Sajeewa <csgsajeewa(at)gmail(dot)com>
To: pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: PGSQL returning into in insert statement
Date: 2020-07-30 02:46:00
Message-ID: CACpofegcG+Ke2r4yoCpwRKPnV8r+fiGfB1w=ur4M3KHvTFKkpg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi all,
I want to use "returning into" in insert statement. I tried below,

insert into test_table(key,value) values('key1',5) returning value into
returnvalue;

and below error occurred- syntax error at or near "into".

What is the correct method to use it?

Thanks!

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2020-07-30 03:05:39 Re: PGSQL returning into in insert statement
Previous Message David G. Johnston 2020-07-30 02:32:53 Re: PGSQL insert data to a oid column using SOCI