Graph Theory. Group Discussion. IOS with Swift. Angular Material. Deep Learning. Verbal Ability. Interview Questions. Company Questions. Artificial Intelligence. Cloud Computing. Data Science. Angular 7. Machine Learning. Data Structures. Operating System.
Computer Network. Compiler Design. Computer Organization. Discrete Mathematics. Ethical Hacking. Computer Graphics. Software Engineering. Web Technology. Cyber Security. C Programming. Control System. Data Mining. Data Warehouse. Oracle defines an execution cycle that executes an SQL statement and associates a cursor with it. Before using an explicit cursor, you must declare it in the declaration section of a block or package as follows:.
Before start fetching rows from the cursor, you must open it. To open a cursor, you use the following syntax:. When you open a cursor, Oracle parses the query, binds variables, and executes the associated SQL statement. Oracle also determines an execution plan, associates host variables and cursor parameters with the placeholders in the SQL statement, determines the result set, and sets the cursor to the first row in the result set.
More about parameterized cursor in the next tutorial. If you declare a cursor in an anonymous block , procedure , or function , the cursor will automatically be closed when the execution of these objects end. However, you must explicitly close package-based cursors.