下面通过代码说明之间的区别,如下: create table testtb( id int not null primary key, name varchar(50), age int ); insert into testtb(id,name,age)values(1,"bb",13); select * from testtb; insert ignore into testtb(id,name,age)values(1,"aa",13); select * from testtb;//仍是1,“bb”,13,因为id是主键,出现主键重复但使用了ignore则错误被忽略 replace into testtb(id,name,age)values(1,"aa",12); select * from testtb; //数据变为1,"aa",12