PL/SQL プロシージャの宣言内に if ステートメントを含める方法があるかどうか疑問に思っています。例えば:
procedure testing (no IN NUMBER, name IN VARCHAR2) IS
if no = 0 then
cursor c is
select * from table where name = name;
else
cursor c is
select * from table where name = name;
end if;
BEGIN
--work with cursor c
END testing;
これは多かれ少なかれそれの意図です。