KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to delete a row from one table and insert it with some additional data into another. I know this can be done in two separate commands, one to delete and another to insert into the new table. However I am trying to combine them and it is not working, this is my query so far: insert into b (one,two,num) values delete from a where id = 1 returning one, two, 5; When running that I get the following error: ERROR: syntax error at or near "delete" Can anyone point out how to accomplish this, or is there a better way? or is it not possible?
Tags (comma-separated)
Save Edits
Cancel