if exists(select * from table where ip=@ip)
    insert into ip (ip) values(@ip)
类似这种句子 在高并发情况下 还是会出现ip重复