Re: Record Insert and serial ID question
Posted in 1997
Gert Brinkmann <gbrinkmann@dimedis.de> wrote: :Nils Myklebust wrote: :> select dbinfo('sqlca.sqlerrd1') :> from sometable :> where condition returning only one row :> :> The best is to have a table that contains a single row only (we always :> have one anyway with some system data) and simply do: :> :> select dbinfo('sqlca.sqlerrd1') :> from thetablewithonlyonerow : :more simple: :if you want the serial-value in "id" from "my_table": : :select id from my_table where id = dbinfo(...); That was the original suggestion. The only disadvantage with this is that it will result in an indexed access. The point of selecting from a table that contains only one row is it will simply read that row with a minimum of discaccess. If you have many users doing this all the time there is a good chance this row will stay in memory so it would be very fast. Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org