Select in update

From: "Joo" Paulo Batistella <batistellabr(at)yahoo(dot)com(dot)br>
To: pgsql-general(at)postgresql(dot)org
Subject: Select in update
Date: 2002-07-08 19:35:23
Message-ID: 20020708193523.75799.qmail@web21203.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello!

I need to update a table (13000 rows) using something
like this:
update rua set cod_bairro =
(select cod_bairro from bairro b where b.vetbairro =
r.vetbairro)

Is it possible?? Can I use a select statement as input
for an update??

Thanks,
JP

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Reyes 2002-07-08 19:54:04 Re: CRC function?
Previous Message Tom Lane 2002-07-08 19:30:20 Re: WAL recycling, Linux 2.4.18