It makes no sense to use replace into because a)you're truncating the table first, and b) you only have one field anyways. with an empty table it's synonymous with insert into. it will work of course, but might be slightly higher overhead. But I'm just telling you so you understand ... it's meant to insert any new rows, ignore existing/same rows, and then perform an update (via a delete then insert) upon the ADDITIONAL fields in a table ... where it finds a value match on either a unique index or a primary key.
The better/lower overhead way to do what you're talking about here is like so:
(edit, sorry did this wrong the first time)
delete from tbl1 where not exists (select * from tbl2 where tbl1.id = tbl2.id);
replace into tbl1 select * from tbl2;
Not only is it less 'work' but it also makes it so that there's no 'time' when your table is sitting there empty (which may or may not be good/matter, but is 'typically preferable').
here's an example to show how replace into is meant to work (copy and run in sql editor):
create table tbl1 (id int, value int, constraint pkbl1 primary key (id));
create table tbl2 (id int, value int, constraint pkbl2 primary key (id));
insert tbl1 select 1, 1;
insert tbl1 select 2, 2;
insert tbl2 select 1, 1;
insert tbl2 select 2, 99;
insert tbl2 select 3, 3;
replace into tbl1 select * from tbl2;
select * from tbl1;
drop table tbl1;
drop table tbl2;
/* you should get back a scenario where tbl1 matches tbl2:
1,1 (matching row on primary key with same value ... left alone ... nifty feature #1 of replace into)
2,99 (matching row on primary key with different value ... in this case, any other field's values get updated with new data ... nifty feature #2 of replace into)
3,3 (this was unmatched on primary key and hence a new row is inserted ... in your present scenario, all your rows are new ... so your replace is really just an insert)
which is 1/2 of what you wanted, but replace into will not DELETE 'missing' rows from the other table, it only inserts/updates.
*/
Here's the same example, plugging in the code I gave you, with an additional row in tbl1 that you no longer want. Note you get the same result in the end as the first example ... because you've first deleted the matching rows.
create table tbl1 (id int, value int, constraint pkbl1 primary key (id));
create table tbl2 (id int, value int, constraint pkbl2 primary key (id));
insert tbl1 select 1, 1;
insert tbl1 select 2, 2;
insert tbl1 select 4,99;
insert tbl2 select 1, 1;
insert tbl2 select 2, 99;
insert tbl2 select 3, 3;
delete from tbl1 where not exists (select * from tbl2 where tbl1.id = tbl2.id);
replace into tbl1 select * from tbl2;
select * from tbl1;
drop table tbl1;
drop table tbl2;