Questions Related to databases

Multiple choice technology databases
  1. Begin Dbms_output.put_line(add_three_numbers (3,4,5)); End; /

  2. Begin Dbms_output.put_line(add_three_numbers (a => 3, b=>4,c=>5)); End; /

  3. Begin Dbms_output.put_line (add_three_numbers (3, b=>4,c=>5)); End; /

  4. select add_three_numbers (3, b=>4,c=>5) from dual

Reveal answer Fill a bubble to check yourself
D Correct answer
Multiple choice technology databases
  1. begin For 1 in reverse 1..3 loop dbms_output.put_line(‘I is’ ||i); End loop; End; /

  2. begin For 1 in 1..3 reverse loop dbms_output.put_line(‘I is’ ||i); End loop; End; /

  3. begin For 1 in 3..1 loop dbms_output.put_line(‘I is’ ||i); End loop; End; /

  4. begin For 1 in 3..1 reverse loop dbms_output.put_line(‘I is’ ||i); End loop; End; /

Reveal answer Fill a bubble to check yourself
A Correct answer
Multiple choice technology databases
  1. Close cursor statement is not included

  2. No exception block present

  3. exit when c%notfound; this should have been given as exit when c%not_found;

  4. I emp%row_type; it should be given as %ROWTYPE

Reveal answer Fill a bubble to check yourself
D Correct answer
Multiple choice technology databases
  1. It will print the value of divide operation

  2. When others exception will be executed as we can't concatenate number with a string in dbms_output statement directlt. We have to use to_char to convert it as varchar2

  3. WHEN ZERO_DIVIDE will be executed

  4. When others exception will be executed as pe_ratio is not initialized.

Reveal answer Fill a bubble to check yourself
C Correct answer