UPDATE subselect?

From: Chris Bitmead <chris(dot)bitmead(at)bigfoot(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: UPDATE subselect?
Date: 1999-04-16 13:10:28
Message-ID: 371736C4.96C8469E@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


What is the correct syntax for this UPDATE?

CREATE TABLE category (
name text,
image text,
url text,
parent oid[]
);
update category set parent = '{0,0}' where name='slr';
So far so good...
update category set parent[0] = (SELECT oid from mfr where
name='canon');
ERROR: parser: parse error at or near "select"

--
Chris Bitmead
http://www.bigfoot.com/~chris.bitmead
mailto:chris(dot)bitmead(at)bigfoot(dot)com

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message José Soares 1999-04-16 13:28:02 Re: [SQL] Update on 6.5
Previous Message Lucas Di Pentima 1999-04-16 02:26:26