I have a table with id,user_id,timestamp
and I'm trying to INSERT
into the table, the user_id
from a DELETE from table where id=some_number
and timestamp
. So what I'm trying to achieve looks like:
INSERT INTO table (user_id,timestamp)
VALUES (
(DELETE FROM table WHERE id=some_number returning user_id),
current_timestamp+'1 day'
)
RETURNING *;
I am getting a syntax error doing this... Can someone help me here plz...?