Thread: Returning old value on update

Returning old value on update

From
Gerhard Heift
Date:
Hello,

is it possible to get the old value of an update, something like this:

INSERT INTO my_table (col) VALUES (2);

UPDATE my_table SET col = 4 RETURNING old.col;

Should give me the 2.

Regards,
  Gerhard

Attachment