Re: newbie sql question...

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: newbie sql question...
Дата
Msg-id 20030527163243.GA27553@wolff.to
обсуждение исходный текст
Ответ на newbie sql question...  (Jason Ziegler <moo@zigfam.org>)
Список pgsql-general
On Tue, May 27, 2003 at 00:07:48 -0500,
  Jason Ziegler <moo@zigfam.org> wrote:
> Hello folks, I'm new to this list, and have been putting up with mysql
> for too long, so please forgive me for asking such a newbie question as
> this:
>
> I have a query that works in mysql:
> "INSERT INTO table1 ( id, column2, column3 ) VALUES ( '1', 'text
> stuff', 'text stuff' ), ( '2', 'more text', 'even more text')"

It is possible to do more than one insert in a single statment. You
can build a select list using a union between the rows being added
and use the insert from a select to load the data. I suspect that
this won't work well for really long lists. I don't know that it is
any faster than using multiple inserts in a single transaction.

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

Предыдущее
От: Damien
Дата:
Сообщение: Re: speed w/ OFFSET/LIMIT
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Postgresql on SUN Server