Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> last inserted id

last inserted id

From: almir <a.kazazic_at_medienhaus.co.at>
Date: Sun, 25 Mar 2001 12:40:06 GMT
Message-ID: <GGlv6.44086$Y8.1889039@news.chello.at>

i am using oracle trhough php, and have a extra function for inserting new rows, up to now with single parametar sql statement, that always returns last inserted id depending of database in mysql is mysql_inserted_id or in sql server select @identity ,
that was easy but now in oracle how can i achive that i have about 40 tables( with their triggers and sequencies) my only idea in moment is to take the name of table from statement (third word) and give that function parametar from now on , that would be ignored on other RDBMS, and before i make commit in my insert function i would do select max(id_name) from 3_word and then make commit , this should do but is somehow realy stupid and i would like to change it , is there a beter why of achieving this

thanks
almir Received on Sun Mar 25 2001 - 06:40:06 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US