Re: conversi ms-sql7 vs postgresql 7.3

Поиск
Список
Период
Сортировка
От Christoph Haller
Тема Re: conversi ms-sql7 vs postgresql 7.3
Дата
Msg-id 3E438396.2983BD2B@rodos.fzk.de
обсуждение исходный текст
Ответ на conversi ms-sql7 vs postgresql 7.3  ("betty" <liongliong@telkom.net>)
Список pgsql-sql
>
> I have table xx:
> id  debet       credit           balance
> 1  1000        0                   0
> 2   2000       0                   0
> 3         0       2500             0
> 4         0         100             0
>
> command in ms-sql 7 can use calculate field (column) balance from id=1
to
> id=4:
> "update xx set bal=balance=bal+debet-credit"
> result:
> id  debet       credit           balance
> 1  1000        0                  1000
> 2   2000       0                   3000
> 3         0       2500             500
> 4         0         100             400
>
> How command sql can use in psotgresql 7.3?
>
Try
UPDATE xx SET balance=balance+debet-credit ;

Regards, Christoph




В списке pgsql-sql по дате отправления:

Предыдущее
От: dev@archonet.com
Дата:
Сообщение: Re: which will be faster? w/ or w/o indices
Следующее
От: Gary Stainburn
Дата:
Сообщение: efficient count/join query