Multiple choice technology databases

Which two program declarations are correct for a stored program unit? (Choose two)

  1. CREATE OR REPLACE FUNCTION tax_amt (p_id NUMBER) RETURN NUMBER

  2. CREATE OR REPLACE PROCEDURE tax_amt (p_id NUMBER) RETURN NUMBER

  3. CREATE OR REPLACE PROCEDURE tax_amt (p_id NUMBER, p_amount OUT NUMBER)

  4. CREATE OR REPLACE FUNCTION tax_amt (p_id NUMBER) RETURN NUMBER(10,2)

  5. CREATE OR REPLACE PROCEDURE tax_amt (p_id NUMBER, p_amount OUT NUMBER(10, 2))

Reveal answer Fill a bubble to check yourself
A,C Correct answer
Explanation

In PL/SQL stored program units, functions require a return data type without specifying constraints (e.g., RETURN NUMBER, not RETURN NUMBER(10,2)). Procedures do not have a RETURN clause in their header but can specify OUT parameters without precision constraints. Thus options 607800 and 607802 are correct.