What is the syntax for UPDATE from one table to another?

From: pw <p(dot)willis(at)telus(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: What is the syntax for UPDATE from one table to another?
Date: 2004-03-12 17:40:13
Message-ID: 4051F5FD.7040405@telus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hello,

What is the proper syntax for updating a column inone table from
a column in another?

I have tried this:

UPDATE destination_table FROM source_table SET
destination_table.column_one = source_table.column_b WHERE constraint;

This fails, so I must have the syntax incorrect.

Thanks for any help,

Pete

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff 2004-03-12 18:19:35 Re: What is the syntax for UPDATE from one table to another?
Previous Message Chris Travers 2004-03-12 17:17:00 Re: Composite types in tables