oracle doesn't allow variable binding in ddl statements!
eg:
declare
stmt varchar2(2048);
begin
for t in (select * from all_users where username like 'osm_%') loop
stmt := 'drop user ' || t.username || ' cascade';
execute immediate stmt;
end loop;
end;
/
|
注意:
dll是没办法bind变量的,只有通过字符串来组合完成自己想要的功能了!
阅读(1938) | 评论(0) | 转发(0) |