alternative to auto increment with oracl

admin

Administrator
Staff member
hi there,

I have to work with an oracle database. In principle everything is ok, but i am used to work with mysql and i use usually the auto incerement function for the table id. As far as I know oracle doesn't has this function. Is there any code/function out there that will mimic the auto increment inside my php script, so that I don't have to worry about my former scripts. All sql statements are simple with no mysql specific code in there, besides the auto increment in the table. All SQL statements in my scripts are independend, because I use a self made function to connect and work with the database, so I only have to change these functions to talk with oracle and this would allow to use the same old SQL statements. If there is a code that will mimic the auto increment, like searching the highest value and make the new entry plus one or something. It would save me some time if there is anything I can use.
Thanx in advance,

Andreas
 
Back
Top