Du skulle förmodligen använda en IN
sats i din DELETE
:
DELETE FROM `EmployeeTable` WHERE EmployeeID IN (2, 3, 4, 5, ...)
Detta kan implementeras med String.Join
metod för att generera listan:
var query = "DELETE FROM `EmployeeTable` WHERE EmployeeID IN (" +
String.Join(",", myArray) + ")";