Du ville sandsynligvis bruge en IN
klausul i din DELETE
:
DELETE FROM `EmployeeTable` WHERE EmployeeID IN (2, 3, 4, 5, ...)
Dette kunne implementeres med String.Join
metode til at generere listen:
var query = "DELETE FROM `EmployeeTable` WHERE EmployeeID IN (" +
String.Join(",", myArray) + ")";