I would like to create a query like this
Code: Select all
Select * from table where (id=1 or id=2 or id=3)It is possible to do that in automatic ?
Thank's
Code: Select all
Select * from table where (id=1 or id=2 or id=3)Code: Select all
MyQuery.SQL.Clear;
MyQuery.SQL.Add('select * from table');
MyQuery.SQL.Add('where id IN (');
for i := 0 to Length(arr) - 1 do
MyQuery.SQL.Add(arr[i] + ',');
MyQuery.SQL.Add(')');