Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> last inserted id
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
![]() |
![]() |