declare numss number;
begin
select count(*) into numss from tcaudit t where t.entid='"+c.getEntId()+"' ;
if(numss=0) then insert into tcaudit(entId,isAudit) values('"+c.getEntId()+"','1'); 首先查看是否存在该记录,不存在则新增一条
elsif('"+c.getisAudit()+"'=0) then update tcaudit set isAudit=1 where entId='"+c.getEntId()+"'; 根据条件来更新
elsif('"+c.getisAudit()+"'=1) then update tcaudit set isAudit=0 where entId='"+c.getEntId()+"';
end if;
end;