I ask about alternative or similar query in informix
to perform the following:
INSERT INTO days (depcode,studycode,batchnum) values (1,2,3);SELECT SCOPE_IDENTITY();
I want a query to return the SCOPE_IDENTITY()
during insertion statement
I ask about alternative or similar query in informix
to perform the following:
INSERT INTO days (depcode,studycode,batchnum) values (1,2,3);SELECT SCOPE_IDENTITY();
I want a query to return the SCOPE_IDENTITY()
during insertion statement
I use this sql statement
Select @@Identity
after I inserted rows. It gives me the ID of the last inserted row. I´m using an accessdatabase. I don´t know if it work with your database.I know that in t-sql you have the
OUTPUT
statement? Where[KEY]
is the column name of your primary key and@OUT_KEY
is a variable you need to declareEDIT
For informix you can use
Presuming your pk column is SERIAL