My table is in Sybase database . I am new to Sybase . I need to generate primary key using PrimaryKeyGenerator function. When I am inserting the data I need to get the primary key back and insert that value in some other table . Is there any API in java which retrieve the primary key at the time of inserting .
couldn't we get the key before actual insertion. we will insert the record ourselves after getting the key.
i mean first get the key from that function and store that key in some local variable of your code. then format the query, pass the same key and insert the record. this way you will have the whole record before insertion, including the primary key.