例如:
表名:table
name ae cs fy cl
裂缝 23 44 22.2 20
压裂 57 47 30.2 42
假如我现在要插入一条数据为: 压裂 57 47 30.2 42,这样的话,就有重复记录出现,怎么判断? 重复的话就覆灭,不重复的话就插入。
没有ID,所以不用回答什么判断ID。谢谢
insert into table value(....). 条件如何写? 求大师帮忙!
------解决思路----------------------
直接在数据库里面判断也可以
if not exists (select * from table where name=‘压裂’ and ae=57 and
cs=47 and fy=30.2 and cl=42)
insert into