日期:2014-05-17 浏览次数:20846 次
Declare tablename nvarchar2(32); CURSOR cur1 is select to_char(OBJECT_NAME) from all_objects where owner='SYSTEM' and to_char(created,'YYYY-MM-DD')='2011-06-08' and object_type='TABLE'; begin if cur1%isopen = false then Open cur1; end if; Loop FETCH cur1 INTO tablename; Exit when cur1%NOTFOUND; execute immediate('DROP TABLE '||tablename) ; -- 这里提示无效SQL语句 End Loop; Close cur1; end;