immediate set values

Поиск
Список
Период
Сортировка
От Gregory Seidman
Тема immediate set values
Дата
Msg-id 20020519171505.A28751@jamaica.cs.brown.edu
обсуждение исходный текст
Ответы Re: immediate set values  ("Joel Burton" <joel@joelburton.com>)
Список pgsql-general
I'd like to insert into a table several pairs of values where the first
value does not change. Rather than numerous INSERT statements, I think
there should be a way to insert from a select with immediate values, but I
just can't figure it out. What I'd like:

INSERT INTO mytable
SELECT 1, *
FROM (1,2,3,4)

...which would result in inserting the pairs

1,1
1,2
1,3
1,4

Is there some clean way of doing this, or do I really need multiple
INSERTs?

--Greg


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

Предыдущее
От: Alexander Klayman
Дата:
Сообщение: Re: Digest Mode
Следующее
От: "Joel Burton"
Дата:
Сообщение: Re: immediate set values