nerdexam
Oracle

1Z0-147 · Question #25

Given a function CALCTAX: CREATE OR REPLACE FUNCTION calctax (sal NUMBER) RETURN NUMBER IS BEGIN RETURN (sal 0.05); END; / If you want to run the above function from the SQLPlus prompt, which…

The correct answer is E. You need to create a SQL*Plus environment variable X and issue the command EXECUTE :X := CALCTAX(1000). See the full explanation below for the reasoning.

Question

Given a function CALCTAX: CREATE OR REPLACE FUNCTION calctax (sal NUMBER) RETURN NUMBER IS BEGIN RETURN (sal * 0.05); END; / If you want to run the above function from the SQL*Plus prompt, which statement is true?

Options

  • AYou need to execute the command CALCTAX(1000); .
  • BYou need to execute the command EXECUTE FUNCTION calctax; .
  • CYou need to create a SQL*Plus environment variable X and issue the command X := CALCTAX(1000); .
  • DYou need to create a SQL*Plus environment variable X and issue the command EXECUTE :X := CALCTAX; .
  • EYou need to create a SQL*Plus environment variable X and issue the command EXECUTE :X := CALCTAX(1000); .

How the community answered

(18 responses)
  • B
    6% (1)
  • D
    11% (2)
  • E
    83% (15)

Community Discussion

No community discussion yet for this question.

Full 1Z0-147 Practice