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

Re: Subselect query for a multi table insert single query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Norman Khine" <norman(at)khine(dot)net>
Cc: "Pgsql-Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Subselect query for a multi table insert single query
Date: 2002-09-23 04:18:54
Message-ID: 14841.1032754734@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
"Norman Khine" <norman(at)khine(dot)net> writes:
>  What should be the correct syntax for embedding this.

This would work fine:

INSERT INTO table VALUES (foo, bar, baz, currval('seq'), ...);

The elements of an INSERT/VALUES list are expressions, not
necessarily literal constants.

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Norman KhineDate: 2002-09-23 06:23:15
Subject: Re: Subselect query for a multi table insert single query
Previous:From: Norman KhineDate: 2002-09-23 04:07:43
Subject: Re: Subselect query for a multi table insert single query

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