当前语句验证:数据有就修改,没有就不修改。数据存在就不插入,不存在就插入。
1.mysql有则修改,没有则新增
update abc inner join (select `name` from abc WHERE `name`=11111 ) as b set abc.`name`=abc.`name`+3;
INSERT INTO abc(name) SELECT '3333' FROM dual where not EXISTS(
select * FROM abc where `name`=3333 );
update abc inner join (select `name` from abc WHERE `name`=11111 ) as b set abc.`name`=abc.`name`+3;
INSERT INTO abc(name) SELECT '3333' FROM dual where not EXISTS(
select * FROM abc where `name`=3333 );
周永发