摘要: insert 语句中不能使用where,所以如果需要根据插入的数据在已有的数据库表是否重复做一些操作可以使用下面三种方法: 1. 使用insert,捕获duplicate错误 2. insert into ... on duplicate key update. 如果重复,执行update 3. i 阅读全文
posted @ 2017-10-13 12:08 Go_Forward 阅读(927) 评论(0) 推荐(0) 编辑