检测重复插入

2023-09-06 08:08:50 作者:哥丶纵横一世

有没有更简单的方法,以prevent刷新后重复插入?我现在做的方式是选择一切与除ID作为参数的所有领域;如果记录存在,我不插入。有没有一种办法可以检测刷新?

Is there an easier way to prevent a duplicate insert after refresh? The way I do it now is to select everything with the all fields except ID as parameters; if a record exists i don't insert. Is there a way to possible detect refresh?

推荐答案

我想你可能要到函数存在。 下面是一个简单的解释EXISTS 我通过谷歌找到。

I think you may want to the EXISTS function. Here's a simple explanation of EXISTS I found through google.

相关推荐
 
精彩推荐
图片推荐