pl/sql stored procedure: parameter name same as column name

后端 未结 4 1517
面向向阳花
面向向阳花 2021-02-02 09:44

I have a Stored Procedure like this

procedure P_IssueUpdate
(
    Id in integer,
    ModifiedDate in date,
    Solution in varchar2
) AS
BEGIN
update T_Issue
Set         


        
4条回答
  •  醉酒成梦
    2021-02-02 10:18

    You can prefix parameter and variable names with the name of the procedure like this:

    SQL> declare
      2     procedure p (empno number) is
      3        ename varchar2(10);
      4     begin
      5        select ename
      6        into p.ename
      7        from emp
      8        where empno = p.empno;
      9        dbms_output.put_line(p.ename);
     10     end;
     11  begin
     12     p (7839);
     13  end;
     14  /
    KING
    
    PL/SQL procedure successfully completed.
    

提交回复
热议问题