摘要: 1. 避免重复入库的插入记录方法 向一个数据库中插入且在未存在的情况下插入一行记录。若有主键可以区分则可以使用 replace into 方法, 单偏偏很多时候数据库设计者会设计自增主键,replace into 方式不便发挥作用,此时可使用 insert select 方式,如: insert into mifc_se_adnw_app(ADNW, ADNWAppId) select 'a3msn', '1' from dual where not exists ( select * from mifc_se_adnw_app where ADNW=' 阅读全文
posted @ 2013-12-11 19:39 rereadyou 阅读(8063) 评论(0) 推荐(0) 编辑