0
插入可以說我有一個表temp123
作爲PostgreSQL的:將選擇與返回的ID
Column | Type | Modifiers
------------+-------------------+------------------------
id | integer | not null default nextval('temp12_id_seq'::regclass)
description | character varying |
我想返回的ID通過
INSERT INTO temp123 (description)
VALUES ('TESTING') RETURNING ID;
以`選擇」結合起來。例如(不工作):
SELECT 23, x.*
FROM (INSERT INTO temp123 (description)
VALUES ('TESTING') RETURNING id) AS x;
不需要在你的榜樣的PostgreSQL v9.0.2