How to delete each alternate row in the access table

I have a huge access table containing about 400,000 rows. what sql query can I give to delete every alternate row in the table.

I have a column in a table that has values ​​from 1, 2, 3, 4 .... about 400,000.

+1
source share
2 answers

Try using Mod . Sort of

 DELETE Table1.* FROM Table1 WHERE ((([ID] Mod 2)=0)); 
+3
source

Assuming your table name is β€œtable” and your column with row number is called β€œid”, this will be

 DELETE FROM table WHERE MOD(id,2)=0 

Edit: This seems to be the wrong syntax for MS Access. Use the solution below for users.

0
source

All Articles