Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
Given the schema:
CREATE TABLE test ( |
id INT PRIMARY KEY, |
ordinal VARCHAR(10) |
);
|
INSERT INTO test (id, ordinal) VALUES (1, "first"); |
INSERT INTO test (id, ordinal) VALUES (2, "second"); |
The following statement returns the data of the newly inserted row (i.e. "third"):
REPLACE INTO test (id, ordinal) VALUES(1, "third") RETURNING ordinal; |
There should be some way of accessing the old data that was deleted, perhaps using the 'OLD.<col_name>' syntax, as follows:
REPLACE INTO test (id, ordinal) VALUES(1, "third") RETURNING OLD.ordinal; |
Attachments
Issue Links
- relates to
-
MDEV-5092 Implement UPDATE with result set
- Open