Lonni J Friedman
2011-09-20 19:44:52 UTC
Can I use “RETURNING id” in an insert statement with postgresql version
8.1.10?
I cannot find a clear example on how to use it to capture the id created by
the insert statement into a variable in PHP.
INSERT INTO Addresses (address, city, state, postalcode) VALUES ('123 Main
St.','Springfield','MA','01109') RETURNING id;
Is there a reason why you can't use the currval function:8.1.10?
I cannot find a clear example on how to use it to capture the id created by
the insert statement into a variable in PHP.
INSERT INTO Addresses (address, city, state, postalcode) VALUES ('123 Main
St.','Springfield','MA','01109') RETURNING id;
select currval('id_seq')
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin