Retrieving serial or uid in same insert query
Retrieving serial or uid in same insert query
От:
"Esa Pikkarainen" <epikkara@ktk.oulu.fi>
Дата:
Hi, How could I get the value of the Serial column or the UID of the row that I just inserted. I should get it within one and the same query with which I insert that row. I know this is considered in FAQ but it does not solve the problem. According to it I should make two queries: one for insert and one for serial value. I use iHTML PRO edition to handle Postgreql database. This means that I can give only one query to the dbserver at a time. And asking currval(sequence) in a separate ODBC connection is not safe at all. So, is there any way to get Serial value or UID value within the same query which inserts that new record??? Thanks Esa Pikkarainen