begin mystr:='insert into yourtablename values(:new.colname)'; execute immediate mystr using '11111'; /* 用11111来替换new.colname参数,这种写法很像delphi中的参数化 */ end;
CREATE OR REPLACE PROCEDURE insert_tab(as_val VARCHAR2) is vDblink varchar2(1000);
begin vDblink:='insert into tablename values(:new.colname)'; execute immediate vDblink using as_val; commit; end;有N多个COLNAME,只要写N多个参数就行了,不过,我不太明白你要实现的功能,请楼主把你要实现的具体功能描述一下。
is
vDblink varchar2(1000);
begin vDblink:='insert into tablename values(:new.colname)';
execute immediate vDblink using as_val;
commit;
end;有N多个COLNAME,只要写N多个参数就行了,不过,我不太明白你要实现的功能,请楼主把你要实现的具体功能描述一下。