Oracle
1Z0-147 · Question #33
Examine this function: CREATE OR REPLACE FUNCTION CALC_PLAYER_AVG (V_ID IN PLAYER_BAT_STAT.PLAYER_ID%TYPE) RETURN NUMBER IS V_AVG NUMBER; BEGIN SELECT HITS / AT_BATS INTO V_AVG FROM PLAYER_BAT_STAT…
The correct answer is A. SELECT CALC_PLAYER_AVG(PLAYER_ID) FROM PLAYER_BAT_STAT. See the full explanation below for the reasoning.
Question
Examine this function:
CREATE OR REPLACE FUNCTION CALC_PLAYER_AVG
(V_ID IN PLAYER_BAT_STAT.PLAYER_ID%TYPE)
RETURN NUMBER
IS
V_AVG NUMBER;
BEGIN
SELECT HITS / AT_BATS
INTO V_AVG
FROM PLAYER_BAT_STAT
WHERE PLAYER_ID = V_ID;
RETURN (V_AVG);
END;
Which statement will successfully invoke this function in SQL*Plus?
Options
- ASELECT CALC_PLAYER_AVG(PLAYER_ID) FROM PLAYER_BAT_STAT;
- BEXECUTE CALC_PLAYER_AVG(31);
- CCALC_PLAYER('Ruth');
- DCALC_PLAYER_AVG(31);
- ESTART CALC_PLAYER_AVG(31)
How the community answered
(26 responses)- A81% (21)
- B8% (2)
- C4% (1)
- D8% (2)
Community Discussion
No community discussion yet for this question.