CREATE OR REPLACE FUNCTION function_name RETURN DATE AS v_date DATE; BEGIN SELECT t.hiredate INTO v_date FROM scott.emp t WHERE rownum = 1; dbms_output.put_line(v_date); RETURN v_date; END function_name;
CREATE OR REPLACE FUNCTION function_name RETURN DATE AS v_date DATE; BEGIN SELECT t.hiredate INTO v_date FROM scott.emp t WHERE rownum = 1; dbms_output.put_line(v_date); RETURN v_date; END function_name;