declaring variable ?

Поиск
Список
Период
Сортировка
От Lothar Behrens
Тема declaring variable ?
Дата
Msg-id 4802078e6d43acd33ae04dc0f8a652b3@lollisoft.de
обсуждение исходный текст
Список pgsql-odbc
Hi,

I am searching for a way to do the following (MS SQL) in PostgreSQL:

declare @key as int

set @key = (select ID from table1 where name = '...')

insert into table2 (foreignkey, foreignvalue) values(@key, 'some value
here')

I didn't find such a syntax in the documentation.

Regards, Lothar

--
Lothar Behrens                |    Rapid Prototyping ...
Heinrich-Scheufelen-Platz 2        |
73252 Lenningen                  |    www.lollisoft.de


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

Предыдущее
От: Mark Cave-Ayland
Дата:
Сообщение: Re: Proposal for new pgsqlODBC feature - hiding tables inaccessible to the current user
Следующее
От: "Nardmann, Heiko"
Дата:
Сообщение: ChangeLog?