jafotinatos
Programmer
Hello all,
I want to do an insert statement in postgres that returns the value of the id (sequence) that was automatically created, all in one step.
For example i ahve the table like so
create table myTable (
serial id, date entry_date, integer value )
and get something like this:
INSERT INTO myTable (entry_date,value) VALUES ('4/5/1999',4) RETURNING id;
Any ideas anyone? Thanks!
I want to do an insert statement in postgres that returns the value of the id (sequence) that was automatically created, all in one step.
For example i ahve the table like so
create table myTable (
serial id, date entry_date, integer value )
and get something like this:
INSERT INTO myTable (entry_date,value) VALUES ('4/5/1999',4) RETURNING id;
Any ideas anyone? Thanks!