当表中数据不存在即插入,当存在时,即更新

insert or replace into data (ID, Name) values (2,"a")     ID为主键

原文地址:https://www.cnblogs.com/weihongli/p/5664744.html