我使用if not exists(select uid from table where uid = @uid) insert into table ....
为什么会产生重复记录?
已经判断了不存在才插入,但是事实上有时还是会插入已经存在uid记录?
真是奇怪,而且一段时间内还产生好多条这种重复记录,谢谢
...全文
4584打赏收藏
if not exists() insert 为什么还会产生重复记录?如何避免?
我使用if not exists(select uid from table where uid = @uid) insert into table .... 为什么会产生重复记录? 已经判断了不存在才插入,但是事实上有时还是会插入已经存在uid记录? 真是奇怪,而且一段时间内还产生好多条这种重复记录,谢谢