I have the following queries in sqlite which I am using in Xamarin Forms.
allProdsId
is initialized as:
allProdsId = new List<Products>();
First of all, I made a query which retrieves all products ID from the table products. Then I want to delete all orders where orders have ProdId
all the allProdsId
retrieved.
The delete query is not working. Can someone please help me to achieve the WHERE IN
clause in sqlite using xamarin forms ?
allProdsId = _con.Query<Products>("Select ProdId from Products");
con.Execute("DELETE FROM Orders WHERE ProdId = ?", allProdsId);