Update from a table.

Поиск
Список
Период
Сортировка
От Andrew Bell
Тема Update from a table.
Дата
Msg-id 5.1.0.14.2.20011121075700.00ac4a10@acbell.mail.iastate.edu
обсуждение исходный текст
Ответы Re: Update from a table.
Список 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 по дате отправления:

Предыдущее
От: "König, Frank"
Дата:
Сообщение: upper and lower doesn't work with german umlaut?
Следующее
От: "Mark G. Franz"
Дата:
Сообщение: Re: Update from a table.