I keep getting an error next to the return VARCHAR(4)

后端 未结 2 739
梦如初夏
梦如初夏 2021-01-26 12:06

ERROR IS BETWEEN THE VARCHAR2 AND THE (4) seems to be a syntax error.

create or replace

    FUNCTION Employee_exists
        (p_employee_id IN NUMBER)
           


        
2条回答
  •  天涯浪人
    2021-01-26 12:57

        create or replace function test_fun(id in number)
        return long
        as
        disp_price long;
        Begin
        select price into disp_price from orders
        where id=2;
        return disp_price;
        end test_fun;
    
    -----------------------------------------------------------
    OUTPUT
    -----------------------------------------------------------
    declare
    m_price long;
    begin
    m_price:=test_fun(1);
    end;
    

提交回复
热议问题