请各位帮帮忙,
我现在有个问题,
怎样写一个SQL语句:
"如果这条记录存在,才删除"的这么一条SQL语句,
我急用,请帮帮忙,谢谢!

解决方案 »

  1.   

    delete tmp
    where exist (select 1 from tmp where id=n_id);
      

  2.   

    这个问题好象不需要什么技巧
    delete from table_name
    where id=n_id;
      

  3.   

    delete table where rownum in (select rownum from table)
      

  4.   

    没懂,直接delete from table where ...不行吗?
    delete后看sql%rowcount
      

  5.   

    delete from table where ...
      

  6.   

    delete from table_name where id=n_id;
    应该不需要什么技巧啊