I perform the following query:
declare
i number;
begin
execute immediate 'select count(1) from someTable' returning into i;
dbms_output.put_line(i);
end;
and get this Error: returning clause must be used with insert, update and delete!
I perform the following query:
declare
i number;
begin
execute immediate 'select count(1) from someTable' returning into i;
dbms_output.put_line(i);
end;
and get this Error: returning clause must be used with insert, update and delete!
Just a small syntax error (no RETURNING):
DECLARE
i NUMBER;
BEGIN
EXECUTE IMMEDIATE 'select count(1) from user_tables' INTO i;
dbms_output.put_line(i);
END;