create or replace procedure andyutest
as
begin
BEGIN
DECLARE TT NUMBER;
with t
as (
select 10 AS C1 FROM DUAL;
)
SELECT C1 INTO TT
FROM T;
DBMS_OUTPUT.PUT_LINE(TT);
END;
END;
6/1 PLS-00103: Encountered the symbol "WITH" when expecting one of the following: begin function pragma procedure subtype type <an identifier> <a double-quoted delimited-identifier> current cursor delete exists prior
...全文
29623打赏收藏
存储过程中with as的应用
我一直不知道with as能否在存储过程中使用,特此做了个实验,但是报错了, 是否是AS 的原因? create or replace procedure andyutest as begin BEGIN DECLARE TT NUMBER; with t as ( select 10 AS C1 FROM DUAL; ) SELECT C1 INTO TT FROM T; DBMS_OUTPUT.PUT_LINE(TT); END; END; 6/1 PLS-00103: Encountere