Oracle PL/SQL Programming

Test your knowledge of Oracle SQL functions, PL/SQL cursors, loops, and exception handling

18 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which ITERATIVE control construct in PL/SQL is also called as INFINITE LOOP?

  1. Cursor For Loop
  2. Numeric For Loop
  3. While Loop
  4. Simple Loop
Question 2 Multiple Choice (Multiple Answers)

Implicit cursors, process ... Choose all that apply

  1. All INSERT statements
  2. All DELETE statements
  3. All UPDATE statements
  4. Single row SELECT statements
  5. Multiple row SELECT statements
  6. Zero row SELECT statements
Question 3 True/False

Explicit cursors are used to process multiple row SELECT statements

  1. True
  2. False
Question 4 True/False

Index of numeric for loop always increments by one

  1. True
  2. False
Question 5 Multiple Choice (Multiple Answers)

When dealing with Cursor For Loops, which steps are taken care of implicitly? Choose all that apply

  1. DECLARE
  2. OPEN
  3. FETCH
  4. CLOSE
  5. PROCESS
Question 6 Multiple Choice (Single Answer)

Identify the CURSOR attribute that returns the number of rows fetched so far by the cursor?

  1. %FOUND
  2. %NOTFOUND
  3. %ROWCOUNT
  4. %ISOPEN
Question 7 Multiple Choice (Single Answer)

Identify the CURSOR attribute that evaluates to TRUE if cursor returns at least 1 row?

  1. %FOUND
  2. %NOTFOUND
  3. %ROWCOUNT
  4. %ISOPEN
Question 8 Multiple Choice (Single Answer)

Identify the CURSOR attribute that evaluates to FALSE if cursor returns at least 1 row?

  1. %FOUND
  2. %NOTFOUND
  3. %ROWCOUNT
  4. %ISOPEN
Question 9 Multiple Choice (Single Answer)

Identify the CURSOR attribute that evaluates to TRUE if cursor is OPEN?

  1. %FOUND
  2. %NOTFOUND
  3. %ROWCOUNT
  4. %ISOPEN
Question 10 Multiple Choice (Single Answer)

which of the following is the default format for date display

  1. DD-MM-YYYY
  2. DD-Mon-RR
  3. DD-Mon-YY
  4. DD-MON-RR
Question 11 Multiple Choice (Single Answer)

what will be the output of: select rpad('*$*',3,'*') from dual;

  1. *$****
  2. *$*
  3. ****$*
  4. ***
Question 12 Multiple Choice (Single Answer)

what is the output: select substr('Oracle Basics',-5,3) from dual

  1. 'asi'
  2. 'isa'
  3. 'le '
  4. 'acl'
Question 13 Multiple Choice (Single Answer)

what is the output: select mod(1600,300) from dual;

  1. 300
  2. 100
  3. 500
  4. 000
Question 14 Multiple Choice (Single Answer)

Which of the following is not a grouping function?

  1. avg
  2. count
  3. abs
  4. min
Question 15 Multiple Choice (Single Answer)

Which of the folowing is not a oracle function?

  1. round
  2. trunc
  3. maximum
  4. initcap
Question 16 Multiple Choice (Single Answer)

Which method returns the number of rows in a set.

  1. sum
  2. num_rows
  3. count
  4. total
Question 17 Multiple Choice (Single Answer)

Which operator is equivalent to concat function?

  1. &
  2. |
  3. ||
  4. &&
Question 18 True/False

OTHERS is super set of all predefined internal exceptions

  1. True
  2. False