早上好,我是PL / SQL的新手,我不知道为什么会导致错误。
SET SERVEROUTPUT ON
DECLARE
designation VARCHAR2(3000);
BEGIN
SELECT LISTAGG(x.ACCOUNT, ',') WITHIN GROUP (ORDER BY NULL) AS ACCOUNT
INTO designation
FROM acctx x
where x.OBJECT_ID = 1;
DBMS_OUTPUT.PUT_LINE(designation);
END;
/
错误是
ORA-0092;缺少或无效的选项
此查询的结果
SELECT LISTAGG(x.ACCOUNT, ',') WITHIN GROUP (ORDER BY NULL) AS ACCOUNT
FROM acctx x
where x.OBJECT_ID = 1;
是
6012,6061,6082,6068,6018