sql="select count(*) from table where [name]='aaa' and postdate='2006-6-1'" '这里假设postdate是字符串 rs.open sql,conn,1,1 if CInt(rs(0)) > 1 then willDel=true end if rs.close
if willDel=true then conn.execute("delete from table where [name]='aaa' and postdate='2006-6-1'") conn.execute("insert into table ([name], postdate) values ('aaa', '2006-6-1')") end if