Collections:
Loop through the Implicit Cursor in Oracle
How To Loop through Data Rows in the Implicit Curosr in Oracle?
✍: FYIcenter.com
You use the FOR ... IN ... LOOP statement to loop through data rows in the implicit cursor as the following syntax:
FOR row IN dml_statement LOOP (statement block with row.field) END LOOP;
Here "row" is a local RECORD type variable with fields automatically defined to match the fields in the data rows resulted from the DML statement. Here is a good tutorial exercise on loop through data rows with the implicit cursor:
BEGIN FOR row IN (SELECT * FROM employees WHERE manager_id = 101) LOOP DBMS_OUTPUT.PUT_LINE('Name = ' || row.last_name); END LOOP; END; / Name = Greenberg Name = Whalen Name = Mavris Name = Baer Name = Higgins
⇒ Define an Explicit Cursor in Oracle
⇐ Attributes of the Implicit Cursor in Oracle
2018-07-22, 1649🔥, 0💬
Popular Posts:
How To Connect the Oracle Server as SYSDBA in Oracle? This is Step 4. The best way to connect to the...
How To Find Out What Privileges a User Currently Has in Oracle? Privileges granted to users are list...
How To Verify Your PHP Installation in MySQL? PHP provides two execution interfaces: Command Line In...
What Is an Oracle Tablespace in Oracle? An Oracle tablespace is a big unit of logical storage in an ...
How To Generate CREATE TABLE Script on an Existing Table in SQL Server? If you want to know how an e...