![]() Related Questions Cursor for loop implicitly declares %ROWTYPE as loop index,opens a cursor, fetches rows of values from active set into fields in the record and closeswhen all the records have been processed. Latest Answer : Cursor for loop implicitly declares a loop index as %rowtype. It uses result of query to determine dynamically no of times the loop is to be repeated. It performs open, fectch , close operations implicitly. ... Cursor C1 is Select empno, ename from Latest Answer : Commit in this context will not do anything except the commiting the changes into database, done using DML statements. However, if the cursor is created with FOR UPDATE clause, it will raise runtime exception as commit, in that case, would also ... How to view the contents of tables created by the following procedure after the Loop?CREATE OR REPLACE PROCEDURE A0_BULK_COLLECT_TEST IS TYPE EMPLOYEE_MRNO IS TABLE OF A_REGISTRATION_HEADER.ARH_MR_NUM%TYPE; TYPE EMPLOYEE_NAME IS TABLE OF VARCHAR2(255); MRNUMBERS EMPLOYEE_MRNO; NAMES EMPLOYEE_NAME; CURSOR crBulkCollect IS SELECT ARH_MR_NUM, ARH_FIRST_NAME||' '||ARH_MIDDLE_NAME||' '||ARH_LAST_NAME FROM A_REGISTRATION_HEADER WHERE ARH_CTGRY_CD='EMP';BEGIN Read Answers (3) | Asked by : kameshakundy Hi, How do we display the column values of a table using cursors without knowing the column names inside the loop? Read Answers (9) | Asked by : Surendran begin For i in 1..5 loop insert into A values(i); savepoint 1; end loop; rollback to savepoint 1; commitend;--initially there are no data in table A. So my question is after execution of this Latest Answer : The first mistake in this code is savepoint 1;You can't give 1 as identifier. Identifier name must begin with a letter.insert into A values(i);savepoint x;Here you are defining savepoint after inserting the value. So the final savepoint ... How will you stop an infinite loop without closing the program? Latest Answer : use the EXIT statementThis will stop the looping and proceed to the next executable statement.or EXIT WHEN condition ...
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||