Following quiz provides Multiple Choice Questions (MCQs) related to PL/SQL. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which of the following is true about the PL/SQL language?
Q 2 - Which of the following is not true about large object data types and in PL/SQL?
Q 3 - Which of the following is true about the following code snippet?
DECLARE a number(3) := 100; BEGIN IF (a = 50 ) THEN dbms_output.put_line('Value of a is 10' ); ELSEIF ( a = 75 ) THEN dbms_output.put_line('Value of a is 20' ); ELSE dbms_output.put_line('None of the values is matching'); END IF; dbms_output.put_line('Exact value of a is: '|| a ); END;
None of the values is matching
Exact value of a is: 100
the ELSIF statement is wrongly written as ELSEIF
Q 4 - Which of the following is not true about the PL/SQL data structure VARRAY?
Q 5 - Which of the following is true about PL/SQL cursors?
Q 6 - The following code tries to fetch some information from all the rows in a table named customers for use in a PL/SQL block. What is wrong in the following code?
DECLARE c_id customers.id%type; c_name customers.name%type; c_addr customers.address%type; CURSOR c_customers is SELECT id, name, address FROM customers; BEGIN LOOP FETCH c_customers into c_id, c_name, c_addr; EXIT WHEN c_customers%notfound; dbms_output.put_line(c_id || ' ' || c_name || ' ' || c_addr); END LOOP; CLOSE c_customers; END;
Q 7 - Which of the following is not a benefit of a database trigger?
Q 8 - Which of the following is a PL/SQL collection types?
Q 9 - Which of the following code is the correct syntax for creating a nested table named salary that will store integer values?
Q 10 - Which of the following code will create an object type named local_address with two field house_no and street?