mysql中 insert ignore 的使用示例如下:

  INSERT IGNORE INTO `table_name` (`reportid`, `content`) VALUES (‘11111’,‘hello’);

  需要注意的是,如果对应的表没有加唯一索引或者相应主键的话,insert ignore是不起作用的。

相关文章: