Total Pageviews

February 27, 2019

2/27/2019 02:55:00 PM
1) Which of the following is a valid reason for deciding to create a subprogram as a function rather than as a procedure?

 A. It must be callable from SQL statements.
 B. It must be stored as a named object in the data dictionary.
 C. It must be callable from both named and anonymous PL/SQL blocks.
 D. The purpose is to accept one parameter and return multiple values.
 E. The subprogram will require the use of both IN and OUT parameters.


2)Which two tasks should be created as functions instead of as procedures? (Choose two.)
A. Reference host or bind variables in a PL7SQL block of code
B. Tasks that compute and return multiple values to the calling environment
C. Tasks that compute a value that must be returned to the calling environment
D. Tasks performed in SQL that increase data independence by processing complex data analysis within the Oracle server, rather than by retrieving the data into an application 

Explanation:
Answer: A,C Explanation: Explanation/Reference: Functions are used to return a value. Functions must return only a single value. Procedure are used to perform an action. Both functions and procedures are using to do a special task or action. In functions it is must to return a single value, where as in procedures it’s not compulsory 
3)Look at the below PLSQL join and select the type of join

select e.ename as employee
m.ename as manager
from employees m
JOIN
employees e
ON e.mgr = m.empno
where e.bdate > date '1965-01-01'
order by employee;
Options
- Self join
- Inner self join
- Self join on a table
- Outer self join 
Ans :Self Join
4)

In a view, WITH CHECK OPTION

Options
- Specifies that only the rows that would be retrieved by the subquery can be inserted
- Specifies that only the rows that would be retrieved by the subquery can be updated
- Specifies that only the rows that would be retrieved by the subquery can be deleted
- Specifies that only the rows that would be retrieved by the subquery can be inserted, updated, or deleted


CORRECT ANSWER : Specifies that only the rows that would be retrieved by the subquery can be inserted, updated, or deleted

5)
 Which two statements are correct about the usage of parameters in functions? (Choose two.)
A. Functions can have only in mode parameters.
B. Functions called in SQL statements cannot have out or in out mode parameters.
C. Functions having in, out, or in out parameters can be called only in named PL/SQL subprograms
D. Functions having in, out, or in out parameters can be called In PL/SQL procedures and anonymous
blocks.
Answer: B,D 
 
Related Posts Plugin for WordPress, Blogger...