How to check if cursor returns any records in oracle?

后端 未结 5 1950
旧时难觅i
旧时难觅i 2020-12-11 02:41

I have a following stored procedure in which I have used a cursor. Depending on whether the cursor return any records or not I need to do some processing.

But I am

5条回答
  •  长情又很酷
    2020-12-11 03:16

    I think that it possible only with FETCH. Try to use

    if myCursor%found then
    // some body
    end if;
    

    But if somebody know another way so correct me.

提交回复
热议问题