sql - 某字段存在则不新增记录,反之新增一条记录
摘要:该字段首先建立唯一索引(不是主键) 方式1: 方式2: openId 是唯一索引,user_name 可以重复 执行 sql :insert ignore into find_user (openId,user_name) values ('xxx','y'); 若openId 已经存在,则不会新增
阅读全文
posted @ 2018-07-20 11:44
posted @ 2018-07-20 11:44
posted @ 2018-07-04 16:35
posted @ 2017-11-05 00:49
posted @ 2017-05-18 09:38