如题

解决方案 »

  1.   

    select语句就是游标啊
    游标有隐式游标和显式游标两种
    当执行select时,oracle隐式地定义游标
    游标就是oracle开辟的内存区域
    执行一句SQL语句,第一步就是开辟内存,即定义游标(显式或隐式)
    第二步式解析SQL语句(parse)
    第三。。
    第四。。
    第五。。
    第六。。
      

  2.   

    select count(*) aa from tablename where ....
    if aa>0 then
    ......
      

  3.   

    open r_cursor for (select * from tablename where condition)
      

  4.   

    select col into yourPara from table
    exception when no_data_found then
      

  5.   

    --使用匿名块
    begin
       select col into yourPara from table;
       exception 
          when no_data_found then
    .
    .
    .
    end;
    --继续