DECLARE
VAR1 VARCHAR(20) := 'TEST';
TAB_NAME VARCHAR(100);
SQL1 VARCHAR(500);
SQL2 VARCHAR(500);
C1 CURSOR;
BEGIN
SQL1 = 'SELECT TABLE_NAME FROM DBA_TABLES WHERE OWNER = '''||VAR1||''';';
OPEN C1 FOR SQL1;
LOOP
FETCH C1 INTO TAB_NAME;
EXIT
WHEN C1%NOTFOUND;
SQL2 = 'DROP TABLE "' || VAR1 || '"."' ||TAB_NAME || '";' ;
EXECUTE IMMEDIATE SQL2;
END LOOP;
CLOSE C1;
END