PL - SQL Interview and Exam Questions
PL - SQL Interview and Exam Questions
29. A PL/SQL procedure can have the parameters in one of the following modes.
a. INNER
b. INOUT
c. OUTER
d. INT
e. INTOUT
30. The PL/SQL statement that is used to get the records from the database with
a query is
a. OPEN statement
b. GETRECORD statement
c. READRECORD statement
d. RECORDFETCH statement
e. FETCH statement
31. Which of the following attribute of a cursor represents the number of the
records processed?
a. %RECORDCOUNT
b. % ROWSIZE
c. % ROWSCOUNT
d. % ROWCOUNT
e. % TABLEROWCOUNT
32. The cursor attribute used to check if rows are fetched
a. %FOUND
b. %NOTFOUND
c. %FETCHED
d. %ROWSFOUND
e. %ROWSFETCHED
33. Read the following PL/SQL code
declare
cursor c1 is select ename from emp;
employee c1%rowtype;
x number(2) := 0;
begin
open c1;
fetch c1 into employee;
while x < 40 loop
dbms_output.put_line (employee.ename);
fetch c1 into employee;
x := x + 1;
end loop;
end;
The data type of the variable employee is same as that of the
a. Row of the %rowtype
b. Ename in the emp table
c. Column of the emp table
d. Row of the emp table
e. RecordType of the emp table
34. A cursor is defined in the
a. Code block
b. Begin component
c. Declare component
d. Exception component
e. Procedure component
35. When there is no corresponding handler for an Exception
a. The PL/SQL block regenerates the exception
b. Oracle server handles the Exception
c. The PL/SQL block terminates and exception propagated to
calling environment
d. Terminates the application program
e. Default exception handlers handle the exception
36. Read the following PL/SQL code
DECLARE
CURSOR product_cur IS
SELECT * FROM products FOR UPDATE OF price;
BEGIN
FOR product_rec IN product_cur
LOOP
UPDATE products SET product_price = (product_rec.price = 0.97)
WHERE CURRENT OF product_cur
END LOOP;
END;
The product_rec is of the data type of a
a. %ROWTYPE of products
b. %ROWTYPE of product_cur
c. %ROWTYPE of product_record
d. %RECORD type of products table
e. row of the products table