Hi, how are we supposed to make more complex queri...
# sql
j
Hi, how are we supposed to make more complex queries? I want to insert a row into Table B and then update a row in Table A with the id of that new row. Currently, I'm just doing a insert and then a separate update but I want to combine it into a single query. Thanks
g
You would use an rpc call with a postgres function to carry out the multiple sql operations.
j
Thanks you. That should work! So there isn't a way to query using raw sql through the client?
g
No, you can look at postgrest to see all the API options available even if you bypassed the js client and made api calls directly. They are relatively limited for database security and accidental performance impact.