On Mon, Feb 12, 2001 at 11:08:55AM +0000, Oliver Elphick wrote:
> DaVinci wrote:
>   > Hi all.
>   >
>   > I want to create a new tuple of main info and detail tuples (in
>   > different tables) that are joined by a key field. Key field is created by
>   > generator automatically and I need that number in order to assign to detail
>   > tuples. How can I to get that number in a safe way?.
> 
> A successful INSERT returns the oid of the row just created; so get the
> new value with a query like this:
> 
>   SELECT key_field FROM table WHERE oid = new_oid_value;

 I have a new question for this idea (thanks). When Database is big, do i
 need index for oid field to speed select?.

 Greets.

                                                                                       
                                 David

Reply via email to