How can I reset the index of the rows? I would like to select and insert data from an old table to the new table:

CREATE TABLE test2 LIKE test1
INSERT INTO test2 SELECT timestamp, datenum FROM test1 WHERE datenum&gt;=23 and datenum&lt;=1000000 ON DUPLICATE KEY UPDATE datenum=VALUES(datenum)


Also I have and id column in the test2 and test1, but I would like to start the id from 1. If I use the query above I'm receiving the following error 

ERROR 1136: Column count doesn't match value count at row 1


INSERT INTO test2 SELECT * FROM test1 WHERE datenum&gt;=23 and datenum&lt;=1000000 ON DUPLICATE KEY UPDATE datenum=VALUES(datenum)


In this case the id start from 3239.
I believe id is autoincrement field, and you want this value to start with 1 in new table.  You can specify column list in your first query, so it won't fail :

INSERT INTO test2 (`timestamp`, datenum) 
SELECT `timestamp`, datenum 
FROM test1 WHERE datenum&gt;=23 and datenum&lt;=1000000