How do I upsert multiple records #2174
Answered
by
inian
milestones95
asked this question in
Questions
-
Hi, I have a table called Orders that has the "order_id" column and "status" column. I'd like to be able to select multiple orders at once on the front end and give them the same status. How can I do that? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
inian
Jul 1, 2021
Replies: 1 comment 2 replies
-
If you just want to update the records you can do this @milestones95 supabase.from('orders')
.update({ status: "newstatus" })
.in('id', [1, 3, 4]) If you want to upsert, you can modify the above example to use upsert |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
inian
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you just want to update the records you can do this @milestones95
If you want to upsert, you can modify the above example to use upsert