Say I have a table with an ID
field, and I have a local array (in any language, php or objective c or basic or whatever) of eligible ID
s. I want to delete any record in which the ID
field does not match any of the eligible ID
s in my array.
Is there any way to do this in a single SQL query? Can you pass an array into SQL and basically say delete from sometable where 'id' is not in 'arrayofids'
?
Thanks for any help. I've looked into the help docs but SQLite/SQL aren't one of my best skills.