1Z0-146 · Question #5
Examine the structure of the PRODUCTS table. Name Null? Type --------------- ------------ --------------- PRODUCT_ID NOT NULL NUMBER(6) PRODUCT_NAME VARCHAR2(50) CATEGORY_ID NUMBER(2) SUPPLIER_ID…
The correct answer is C. The CLOSE statement closes both the cursor variables, therefore the last FETCH statement. See the full explanation below for the reasoning.
Question
Examine the structure of the PRODUCTS table. Name Null? Type --------------- ------------ --------------- PRODUCT_ID NOT NULL NUMBER(6) PRODUCT_NAME VARCHAR2(50) CATEGORY_ID NUMBER(2) SUPPLIER_ID NUMBER(6) LIST_PRICE NUMBER(8,2) View the Exhibit and examine the PL/SQL block. On execution, the PL/SQL block generates the following error:
ORA-01001: invalid cursor What could be the reason?
Exhibit
Options
- ABoth the cursor variable arguments should have been passed in IN mode.
- BThe contents of one cursor variable cannot be assigned to another cursor variable using the :=
- CThe CLOSE statement closes both the cursor variables, therefore the last FETCH statement
- DThe name of the cursor variables defined and the name of the cursor variables passed as arguments
How the community answered
(20 responses)- A5% (1)
- B10% (2)
- C80% (16)
- D5% (1)
Community Discussion
No community discussion yet for this question.
