Re: UPDATE with AND clarification

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: UPDATE with AND clarification
Дата
Msg-id CAKFQuwbrQUPOPhPQbor2=Fhi73bZPm-PYa4aV9oCERZD8SqwLA@mail.gmail.com
обсуждение исходный текст
Ответ на UPDATE with AND clarification  (Jamie Thompson <jthompson.neuk@gmail.com>)
Ответы Re: UPDATE with AND clarification  (Jamie Thompson <jthompson.neuk@gmail.com>)
Список pgsql-sql
On Friday, March 22, 2024, Jamie Thompson <jthompson.neuk@gmail.com> wrote:

Earlier today, I was running some sql for someone which they had submitted as:
> UPDATE tablename SET col1 = val1 AND col2 = val2 WHERE id = X

I presume these columns are booleans.  So you wrote something like:
Set col1 = ( true and false = true )

Which in this case must coincidentally have produced whatever boolean value already existed in col1.

David J.

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: How to choose table in SELECT clause without schema qualifier or 'set local'
Следующее
От: Bindra Bambharoliya
Дата:
Сообщение: Cursor with hold for select takes too long