jl66
asked on
how to deal with table variable in pl/sql
Have a table T1.
I got the error:
PL/SQL: ORA-00942: table or view does not exist
when I executed the pl/sql statement:
declare
str varchar2(10) := 'T1';
cnt number(1);
begin
select count(1) into cnt from str;
dbms_output.put_line(cnt);
end;
/
How to deal with it? In real situation, the table name has to be a variable.
I got the error:
PL/SQL: ORA-00942: table or view does not exist
when I executed the pl/sql statement:
declare
str varchar2(10) := 'T1';
cnt number(1);
begin
select count(1) into cnt from str;
dbms_output.put_line(cnt);
end;
/
How to deal with it? In real situation, the table name has to be a variable.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER