How can I insert the return of DELETE into INSERT in postgresql?

后端 未结 5 2186
闹比i
闹比i 2021-02-07 02:23

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 i

5条回答
  •  粉色の甜心
    2021-02-07 03:13

    That syntax you have there isn't valid. 2 statements is the best way to do this. The most intuitive way to do it would be to do the insert first and the delete second.

提交回复
热议问题