Re: update syntax

From: chester c young <chestercyoung(at)yahoo(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: update syntax
Date: 2002-01-27 02:59:07
Message-ID: 20020127025907.1532.qmail@web12708.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

thanks, but how would this be done for the same table?

update table1 t1 set (c2, c3 ) =
( select c2, c3 from table1 t2 where t1.c1 = t2.c1 and t1.oid < t2.oid
);

and, when tables are listed in the from clause, are they comma
separated?

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2002-01-27 03:40:07 Re: update syntax
Previous Message Brent Verner 2002-01-27 01:03:39 Re: interval and timestamp change?