Re: [SQL] UPDATE subselect?

From: José Soares <jose(at)sferacarta(dot)com>
To: Chris Bitmead <chris(dot)bitmead(at)bigfoot(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] UPDATE subselect?
Date: 1999-04-16 14:58:44
Message-ID: 37175024.21E29E50@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Take a look at PostgreSQL User's Guide
Chapter 10. Arrays

syntax:
INSERT INTO SAL_EMP
VALUES ('Bill',
'{10000, 10000, 10000, 10000}',
'{{"meeting", "lunch"}, {}}');

José

Chris Bitmead ha scritto:

> 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Chris Bitmead 1999-04-16 15:27:34 Re: [SQL] UPDATE subselect?
Previous Message José Soares 1999-04-16 13:28:02 Re: [SQL] Update on 6.5