i have a huge access table containing about 400000 rows . what sql query can i give to delete every alternate row in the table. ?
I do have a column in the table which has values from 1 , 2, 3 ,4 .... about 400000 .
i have a huge access table containing about 400000 rows . what sql query can i give to delete every alternate row in the table. ?
I do have a column in the table which has values from 1 , 2, 3 ,4 .... about 400000 .
Try using Mod
. Something like
DELETE Table1.*
FROM Table1
WHERE ((([ID] Mod 2)=0));
Assuming your table's name is "table", and your column with the line number is named "id", it would be
DELETE FROM table WHERE MOD(id,2)=0
Edit: Apparently, this is the wrong Syntax for MS Access. Use astanders solution below.