nerdexam
Oracle

1Z0-147 · Question #17

Examine this code: CREATE OR REPLACE FUNCTION calc_sal (p_salary NUMBER) RETURN NUMBER IS v_raise NUMBER(4,2) DEFAULT 1.08; BEGIN RETURN v_raise * p_salary; END calc_sal; / Which statements…

The correct answer is D. SELECT salary, calc_sal(salary) FROM employees WHERE department_id = 60; E. SELECT last_name, salary, calc_sal(salary) FROM employees ORDER BY calc_sal(salary). See the full explanation below for the reasoning.

Question

Examine this code: CREATE OR REPLACE FUNCTION calc_sal (p_salary NUMBER) RETURN NUMBER IS v_raise NUMBER(4,2) DEFAULT 1.08; BEGIN RETURN v_raise * p_salary; END calc_sal; / Which statements accurately call the stored function CALC_SAL ? (Choose two.)

Options

  • AUPDATE employees (calc_sal(salary)) SET salary = salary * calc_sal(salary);
  • BINSERT calc_sal(salary) INTO employees WHERE department_id = 60;
  • CDELETE FROM employees(calc_sal(salary)) WHERE calc_sal(salary) > 1000;
  • DSELECT salary, calc_sal(salary) FROM employees WHERE department_id = 60;
  • ESELECT last_name, salary, calc_sal(salary) FROM employees ORDER BY calc_sal(salary);

How the community answered

(49 responses)
  • A
    4% (2)
  • B
    8% (4)
  • C
    14% (7)
  • D
    73% (36)

Community Discussion

No community discussion yet for this question.

Full 1Z0-147 Practice