Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: equal names of: parameter of procedure - columns of table
Sybrand Bakker wrote:
> >I would be lucky if I don't need to rename my variable names and
there
> >is another way to get what I want.
>
> There is not. Obviously, the error starts with assuming there is.
Except that there is. Here's a working example:
SQL> create or replace function get_name (empno in number)
2 return varchar2
3 is
4 ename emp.ename%type;
5 begin
6 select emp.ename into get_name.ename
7 from emp
8 where emp.empno = get_name.empno;
9 return get_name.ename;
10 end;
11 /
Function created.
SQL> select get_name(7900) from dual;
GET_NAME(7900)
![]() |
![]() |