Why we can't execute stored procedure in select statement in oracle? is there any strong reason?

后端 未结 3 899
情书的邮戳
情书的邮戳 2021-01-07 14:00
create or replace procedure pr
is
    v_date date; 
begin
    select sysdate into v_date from dual;
    DBMS_output.put_line(v_date);
end pr;
3条回答
  •  -上瘾入骨i
    2021-01-07 14:24

    CREATE OR REPLACE PROCEDURE count_salas IS   V_count NUMBER(3);    
    BEGIN   
    SELECT COUNT(SALES.SALEQTY) as sales INTO V_count 
    FROM SALES INNER JOIN EMPLOYEE ON EMPLOYEE.EMPID = SALES.EMPID WHERE EMPLOYEE.EMPID = '101';
    
    DBMS_OUTPUT.PUT_LINE(V_count);    END  V_count;
    

提交回复
热议问题