Because there is no type checking with a weak REF CURSOR, all such types are interchangeable. Weak REF CURSOR types are more flexible because the compiler lets you associate a weakly typed cursor variable with any query. Like a cursor, a cursor variable points to the current row in the result set of a multi-row query. A REF CURSOR essentially encapsulates the results of a query. Because many cursor variables might exist to point to many work areas, REF CURSOR can be thought of as a category or data type specifier that identifies many different types of cursor variables. A REF CURSOR, then, identifies a reference to a cursor variable. In SQL, a pointer has the data type REF x, where REF is short for REFERENCE and x represents the entity being referenced. The cursor variables are opened with the privileges of the owner of the procedure and behave just like they were completely contained within the pl/sql routine.Ī cursor variable holds the memory location of a query work area, rather than the contents of the area.ĭeclaring a cursor variable creates a pointer. Cursor variables are cursors opened by a pl/sql routine and fetched from by another application or pl/sql routine. With 7.2 on up of the database you have cursor variables.