Update from a table. - Mailing list pgsql-novice

From Andrew Bell
Subject Update from a table.
Date
Msg-id 5.1.0.14.2.20011121075700.00ac4a10@acbell.mail.iastate.edu
Whole thread Raw
Responses Re: Update from a table.
List pgsql-novice
Hi,

I want to update one table from another table based on a criteria.  For
instance:

            table1                           table2
employee | salary | netSalary         employee | deductions

I want to update table1.netSalary to be table1.salary - table2.deductions where
   table1.employee = table2.employee.

I don't see any way to do something like this with the syntax.  What am I
missing, or what can be recommended?


-- Andrew Bell
acbell@iastate.edu



pgsql-novice by date:

Previous
From: "König, Frank"
Date:
Subject: upper and lower doesn't work with german umlaut?
Next
From: "Mark G. Franz"
Date:
Subject: Re: Update from a table.