It ain't follproof mind -- there is an implicit commit in the DBMS_STATS call, I expect, which could cause problems. Really you should load up the column names into a collection and loop through it.Code:begin for x in (select column_name from user_tab_columns where table_name = 'MY_TABLE') loop DBMS_STATS.DELETE_COLUMN_STATS ( ... colname => x.column_name, ... ); End Loop; End; /




Reply With Quote