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

Insert using a subselect?

From: Francisco Reyes <lists(at)natserv(dot)com>
To: Pgsql Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Insert using a subselect?
Date: 2001-09-10 21:19:52
Message-ID: 20010910171633.B25518-100000@zoraida.natserv.net (view raw or flat)
Thread:
Lists: pgsql-novice
Does PostgreSQL supports doing an insert with a subselect as it's value?
Something like:

insert into hearn_dates (date)
values ((select distinct merge_date from hearn));

The error I am getting is:
ERROR:  More than one tuple returned by a subselect used as an expression.



Responses

pgsql-novice by date

Next:From: Jason TanDate: 2001-09-11 03:18:07
Subject: Re: Insert using a subselect?
Previous:From: G.LeeJDate: 2001-09-10 17:24:06
Subject:

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