Re: inserting multiple rows

Поиск
Список
Период
Сортировка
От Rafael Charnovscki
Тема Re: inserting multiple rows
Дата
Msg-id 410F9EB3.2050004@unesc.rct-sc.br
обсуждение исходный текст
Ответ на inserting multiple rows  (Si Chen <schen@graciousstyle.com>)
Список pgsql-novice
According to the 7.4.3 documentation it's not possible
to insert more than one row with INSERT. See
http://www.postgresql.org/docs/current/interactive/sql-insert.html

I think this is not a PGSQL issue, since SQL standard defines
INSERT command to insert one row at a time.

There are alternatives to insert multiple rows using a SELECT or a COPY.

http://www.postgresql.org/docs/current/interactive/sql-copy.html

http://pgsqld.active-venture.com/tutorial-populate.html

These links may help too:

http://archives.postgresql.org/pgsql-sql/2003-03/msg00076.php

http://archives.postgresql.org/pgsql-novice/2002-05/msg00047.php

http://www.faqs.org/docs/ppbook/r27281.htm

Regards,
Rafael Charnovscki

Si Chen wrote:
> Does PostgreSQL not support
>
> insert into mytable (row1, row2) values ('a', '1'), ('b', '2'), ('c',
> '3'), ('d', '4')
>
> ?  If not, does anyone know why not?
> Si
>


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

Предыдущее
От: mike
Дата:
Сообщение: help with COPY from .csv file into database
Следующее
От: Oliver Elphick
Дата:
Сообщение: Re: help with COPY from .csv file into database