postgresql 获取修改列的值

使用returning

CREATE TABLE users (firstname text, lastname text, id serial
primary key);
INSERT INTO users (firstname, lastname) VALUES ('Joe', 'Cool')
RETURNING id;
INSERT INTO users (firstname, lastname) VALUES ('Frank', 'Ben')
RETURNING id;

delete的时候会把删除的行返回

 DELETE from users RETURNING *;

postgresql 获取修改列的值

上一篇:POJ 2391 floyd+二分最大流


下一篇:eclipse_debug技术