I have a interview question to write a function which takes input as varchar and the output should give in reverse order of input.
This is the code I wrote
`
SQL> create or replace function fn( id in varchar2) return varchar2 is
2 input varchar2(25) := id;
3
4 begin
5
6 dbms_output.put_line(reverse(input));
7
8 return input;
9
10 end;
11 /
Warning: Function created with compilation errors.
LINE/COL ERROR
-------- ------------------------------------------------------------
6/1 PL/SQL: Statement ignored
6/22 PLS-00201: identifier 'REVERSE' must be declared
SQL> select reverse(ename) from emp;
`
Help me with this
Reverse keyword working in SQL where in PLSQL doesn't. why?