How to write a SQL query to delete rows selected rows in table widget

I want to write a SQL query to bulk delete rows that are selected using the table widget.

My query would look something like

DELETE FROM standup_updates WHERE id IN (seletedId1, selectedId2,selectedId3,....)

According to how many table rows are selected ids would increase or decrease.

{{Table1.selectedRows}} gives an array of a stringified object but I am not sure how can i use it to form above mentioned query.

I got the way to make that query. :grinning_face_with_smiling_eyes:

DELETE FROM standup_updates WHERE id IN ({{Table1.selectedRows.map((row) => row.id).toString()}});

The query provided above only worked for me if the “Use Prepared Statement” switch was set to off within the query box like so…

That’s right - we have an issue open for prepared statements, you can track it here