Subject Re: [firebird-support] Return PK Value on Insert
Author klett62
It's better with : before MyVar1

INSERT INTO MyTable
(Column1, Column2, Column3)
VALUES (Value1, Value2, Value3)
RETURNING Value1
INTO :MyVar1



Le 11/08/2013 18:09, W O a écrit :
> INSERT INTO MyTable
> (Column1, Column2, Column3)
> VALUES (Value1, Value2, Value3)
> RETURNING Value1
> INTO MyVar1
>
> Greetings.
>
> Walter.
>
>
>
> On Sat, Aug 10, 2013 at 10:50 PM, John W. (Jack) Cane
> <jwcane@...>wrote:
>
>> **
>>
>>
>> After performing an insert I need to know the value of the primary key of
>> the newly inserted record. If there is a way to get that without performing
>> another select query after the insert, would you please give me or point me
>> to an example.
>>
>> Best,
>> jwc
>> from iMac
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>