Обсуждение: getting value of just inserted rows

Поиск
Список
Период
Сортировка

getting value of just inserted rows

От
lexx_h@chat.ru
Дата:
  

Hello all.
Please, help me,

How can I get single field (attribute) value just inserted new row
into the table  (by not using select query to find this row)?

(type of that field is serial),

---
lexx


Re: getting value of just inserted rows

От
lexx_h@chat.ru
Дата:
But Postgresql doesn't  support all SQL99 standart,
so there is missing such terms as OLD and NEW ,REFERENCING OLD ROW AS..!!


"Darko Prenosil" <Darko.Prenosil@finteh.hr> wrote:
>Create insert trigger and look in the NEW !
>
>
>----- Original Message ----- 
>>   
>> 
>> Hello all.
>> Please, help me,
>> 
>> How can I get single field (attribute) value just inserted new row
>> into the table  (by not using select query to find this row)?
>> 
>> (type of that field is serial),
>> 
>> ---> 


Re: getting value of just inserted rows

От
"."@babolo.ru
Дата:
> >> How can I get single field (attribute) value just inserted new row
> >> into the table  (by not using select query to find this row)?
> >> 
> >> (type of that field is serial),
Why not using select query?
Use oid from last install and select by oid is the best way IMHO

-- 
@BABOLO      http://links.ru/