Reputation: 41
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!
Upvotes: 1
Views: 171
Reputation: 10361
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;
Upvotes: 1