I have a list of items (containing integer ids). I need to delete all row of a table X whose id column’s data match with these list items.
I am using sqlite and here is how I have tried
List<int> lstItem=new List<int>();
//add data to lstItem
//....
SqlComm.CommandText="delete from X where id in @lstItem";
You need to loop through the items: