What is the difference between explicit and implicit cursors in Oracle?

前端 未结 16 1959
温柔的废话
温柔的废话 2020-12-08 07:41

I am a bit rusty on my cursor lingo in PL/SQL. Anyone know this?

16条回答
  •  一个人的身影
    2020-12-08 08:15

    An explicit cursor is defined as such in a declaration block:

    DECLARE 
    CURSOR cur IS 
      SELECT columns FROM table WHERE condition;
    BEGIN
    ...
    

    an implicit cursor is implented directly in a code block:

    ...
    BEGIN
       SELECT columns INTO variables FROM table where condition;
    END;
    ...
    

提交回复
热议问题