Serial value in a Stored Procedure
Posted in 1994
Hello everyone,
Is there a way in a stored procedure to get the value of the
serial field last inserted (like SQLCA.SQLERRD[2] in 4GL).
I want to do something like
create procedure ...
.
.
.
insert into master_table values (0,.....) ## insert a serial field
let ser_val = ? ## How to get the serial value inserted before?
.
.
insert into detail_table values (ser_val,....).
.
.
end procedure;
Thanks in advance.
+---------------------------+--------------------------+
| G.T.Madavan, | e-mail: gtmad@smi.mn.org |
| Systems Migration Inc., | Phone : (612) 890-0040 |
| Burnsville, MN, U.S.A | Fax : (612) 890-0966 |
+---------------------------+--------------------------+
Disclaimer: The author's opinions are his own, and not
necessarily those of Systems Migration Inc.