100分相送!在线等待!
zgysc 2003-09-29 04:23:56 我写个过程如下:
create or replace procedure aa
as
talename varchar2(100);
tempid number;
begin
tablename :='table1';
select id from tablename into tempid;
insert into table2(vv) values(tempid);
commit;
end;
但始终报错:系统没根本没有tablename这个表,要是把 select id from tablename into tempid;里的tablename 换成 table1 才能执行
也就是说用变量根本代替不了表名,我怎么样才能实现用变量替代表名呢?