Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL question (using result of nested statement in arithmetic operation)
On Fri, 25 Apr 2003, stephan.grimm_at_igd.fhg.de wrote:
> BTW: I need a solution that works with Oracle as well as MySQL using
> the same syntax!
You do not create one piece of code to port to all DBMS's, instead, you create a proc, maybe, get_new_id that returns the id.
In Oracle, this executes sequence.nextval. In MySQL, it does whatever that one does. Your code calls the same stored proc, but the stored proc does very database specific code.
-- Galen deForest Boyer Sweet dreams and flying machines in pieces on the ground.Received on Sat Apr 26 2003 - 21:39:15 CDT
![]() |
![]() |