on duplicate key update简单使用

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

select * from player_count where player_id = 1;//查询统计表中是否有记录
insert into player_count(player_id,count) value(1,1);//没有记录就执行insert 操作
update player_count set count = count+1 where player_id = 1;//有记录就执行update操作