Oracle 11g alternative options for oracle 12c with function

oracleoracle-11g-r2query

I am using (with function) in Oracle 12c. in 11g this is not available. Is there any other way we can implement with function in 11g?

with 
  function x(p_NUM in number) return number
  is
    n number;
  begin
    SELECT 1 INTO N FROM DUAL;
    --
    return N;
    --
  end ; 
  --      
  function Y(p_NUM in number) return number
  is 
    N1 NUMBER;
  begin
    SELECT 2 INTO N1 FROM DUAL;
    --
    return N1;
    --
  end ; 
--
select X(1), Y(1)
from dual;

Best Answer

Create the functions within a PACKAGE.

Beyond that, you are using a feature that was introduced in 12c.