select count(*) into I_count from ..........
 if I_count = 0 then 
   .....
 else
  .......

解决方案 »

  1.   

    ...
    begin
        select passwords,card_status 
        Into tmp_passwords ,tmp_card_status 
        from pass_table 
        where passwords=:new.msgcontent;
    exception
        when no_date_found then 
           --找不到数据时处理
    end;
      

  2.   

    可以使用 sql 的隐式游标,例子如下:select count(*) into I_count from ..........
     if sql%rowcount=0 then 
       .....
     else
      .......
      

  3.   

    exception
        when no_data_found then