Re: request for sql3 compliance for the update command

Поиск
Список
Период
Сортировка
От Mike Aubury
Тема Re: request for sql3 compliance for the update command
Дата
Msg-id 200302201909.54460.mike@aubit.com
обсуждение исходный текст
Ответ на Re: request for sql3 compliance for the update command  ("Dave Page" <dpage@vale-housing.co.uk>)
Список pgsql-hackers
Informix supports 2 different styles for the update - your one would have to
be written :


UPDATE djp SET(col1, col2) = ((SELECT col1,col2 FROM some_other_table))

Notice the double brackets !
The first signifies a list of values - the second is the brackets around the
subquery...

(NB If you try to reference the same table in the Update - you'll get an
error....)


For single columns you could still write :

UPDATE djp SET col1 = (SELECT col2 FROM some_other_table)

Notice - one more set of brackets on the right as on the left....


> UPDATE djp SET(col1, col2) = (SELECT col2, col1 FROM djp)



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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: request for sql3 compliance for the update command
Следующее
От: Tom Lane
Дата:
Сообщение: Re: A bad behavior under autocommit off mode