Syntax error in PL SQL
DECLARE
 CURSOR t1 is
     select table_name from dba_tables where owner='SAPIENS_TESTE' and num_rows &gt; 10000000;
BEGIN
 FOR t IN t1 LOOP
    DBMS_STATS.GATHER_TABLE_STATS(OWNNAME =&gt; 'SAPIENS_TESTE', TABNAME =&gt; t.table_name, partname =&gt; NULL, granularity =&gt; 'GLOBAL', CASCADE =&gt; TRUE, method_opt =&gt; 'FOR ALL INDEXED COLUMNS SIZE AUTO');
 END LOOP;
END;
/