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: (view raw, whole thread or download thread mbox)
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.


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

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