Which two tasks should be created as functions instead of as procedures?

Which two tasks should be created as functions instead of as procedures? (Choose two.)

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



Leave a Reply 23

Your email address will not be published. Required fields are marked *


surprise

surprise

I think C and D.

qaisarimtiaz

qaisarimtiaz

A and B

PIERO

PIERO

what about ….
you cannot use host or bind variable with stored procedure so you cannot use funtion or procedure …..
BUT you can if use execte immediate……
WHY ANYONE COULE ANSWER (( A )) ?????????

Piero Montanaro

dani

dani

A,B

Miroslav

Miroslav

C and D.

A. Host variable can be referenced in PL/SQL block with function(:hv:=function) and with procedure(procedure(:hv)) so this is no answer.
B. This is for procedure.
C. This is for function.
D. This is advantage of user-defined functions in SQL statements.

Kuki

Kuki

i agree, Miroslav

Aarti

Aarti

Agree with Miroslav.
C and D are correct.

Harshal

Harshal

A and C are Correct
cuz in option D it says process complex data means it invlove DML and that is not acceptable in SQL query if ur using function within it.

Kelvin

Kelvin

that’s y you use a function.

dj

dj

i agree that c and d are correct
because in a should be host and local variable so that the answer would be correct

Vladimir_K

Vladimir_K

c and d

Uladzimir

Uladzimir

A, C

is right answer

FAHAMIDA(IDB23)

FAHAMIDA(IDB23)

A-wrong :plsql 11g book 2 les_2 pg 5,
c,d answer:plsql 11g book 2 les_2 pg 13,

Leo Yu

Leo Yu

Could you give a hyper link?
“A-wrong :plsql 11g book 2 les_2 pg 5”

Leo Yu

Leo Yu

A) is incorrect, in the embeded plsql or dynamic plsql, host variavle or bind variable could apply either procedure or function

jean barboza

jean barboza

the answer correct is C,D

D because

Advantages of User-Defined Functions in SQL Statements
SQL statements can reference PL/SQL user-defined functions anywhere a SQL expression is
allowed. For example, a user-defined function can be used anywhere that a built-in SQL
function, such as UPPER(), can be placed.
Advantages
• Permits calculations that are too complex, awkward, or unavailable with SQL. Functions
increase data independence by processing complex data analysis within the Oracle server,
rather than by retrieving the data into an application