Insert vs Update syntax

Поиск
Список
Период
Сортировка
От Clodoaldo
Тема Insert vs Update syntax
Дата
Msg-id a595de7a0802290817w4ae2244i915d7d308a4c4bbd@mail.gmail.com
обсуждение исходный текст
Ответы Re: Insert vs Update syntax
Список pgsql-general
When inserting into a table and there are many columns to be inserted
it is hard to synchronize columns to values:

insert into my_table (
    a,
    b,
    c,
    ...many more columns
)values(
    @a,
    @b,
    @c,
    ... the corresponding values
)

Is there some reason for the insert syntax to be the way it is in
instead of the much easier to get it right Update syntax?:

update my_table
set a = @a,
b = @b,
c = @c,
...

Regards, Clodoaldo Pinto Neto

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

Предыдущее
От: Steve Clark
Дата:
Сообщение: ecpg problem
Следующее
От: Tom Lane
Дата:
Сообщение: Re: errors in pg_restore on windows?