Friday, September 1, 2017

Named PL/SQL Blocks

1. An unnamed block can call a function
Ans: True

2. Function in PLSQL is not a subprogram
Ans: True

3. Ways to handle unnamed system exceptions are
Ans: Both A and B (By using WHEN OTHERS exception handler, By associating the exception code to a name and using it as a named exception)

4. Which of the following is the correct way to pass arguments to a procedure?
Ans: exec procedure_name(argument1.argument2)

5. Consider the following PROCEDURE which uses table items having a unique id, a name and a price. Assume that id in table are 101, 102, 103. 
CREATE OR REPLACE PROCEDURE try(i_id IN items.id%TYPE)IS det items%ROWTYPE; BEGIN select * into det from items where id=i_id; dbms_output.put_line(det.name); end;/ 
Is the call to this procedure by the below unnamed block correct?
(TRUE/FALSE) BEGIN try(101);end;/
Ans: True

6.What will the following procedure display? Create or replace procedure proced is d_count number(2); BEGIN select count(*)into d_count from department; dbms_output.put_line(d_count); end;/
Ans: Total number of rows including null

7. What will be the output of the below procedure after execution?
CREATE OR REPLACE PROCEDURE try IS i_detail items%ROWTYPE; BEGIN select * into i_detail from items; dbms_output.put_line(i_detail.name); END;/
Ans: Procedure will be created, Runtime Error

8. An exception can be
Ans: All of the options (An error generated by the system, An error caused by the user action, A warning issued by the application to the user)

9. Subprograms are named PL/SQL blocks that can be called with a set of parameters.
Ans: True

10. Different parts of PL/SQL exceptions are
Ans: Exception type, Error code, Error message

11. Which command should be used to turn on the output of PL/SQL commands in SQL*Plus?
Ans: set serveroutput on


  • References for Study Purpose:

1. Advanced Oracle PL/SQL Developer's Guide (Highly Recommended) 

2. Oracle Advanced PL/SQL Developer Professional Guide (Highly Recommended) 

3. Easy Learning Learn Oracle PL/SQL Video Training Tutorial DVD 
4. Oracle PL/SQL Training Guide  
5. iPRIMED PL/SQL Programming
6. SQL, PL/SQL: The Programming Language Of Oracle (With CD-ROM) 4th Revised Edition
7. Oracle Database 12c Hands-on SQL and PL/SQL
8. Oracle PL/SQL with Example 5th Edition
9. Oracle PL/SQL Performance Tuning Tips and Techniques 1st Edition
10. Learning Oracle SQL and PL/SQL: A Simplified Guide

1 comment:

  1. Are you looking for the best Azure Training in ChennaiHere is the best suggestion for you, Infycle Technologies the best Software training institute in Chennai to study Azure platform with the top demanding courses such as Graphic Design and Animation, Cyber Security, Blockchain, Data Science, Oracle, AWS DevOps, Python, Big data, Python, Selenium Testing, Medical Coding, etc., with best offers. To know more about the offers, approach us on +91-7504633633, +91-7502633633.

    ReplyDelete