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变量的,只有通过字符串来组合完成自己想要的功能了!
阅读(1953) | 评论(0) | 转发(0) |