VARIABLE name_02 varchar2(30)
Rem tunemview02.sql
EXECUTE DBMS_ADVISOR.TUNE_MVIEW -
( :name_02 -
  , 'CREATE MATERIALIZED VIEW cuco_mv -
     REFRESH FAST -
     ENABLE QUERY REWRITE -
     AS -
       SELECT cu.cust_last_name -
             , co.country_name -
       FROM customers cu -
           , countries co -
       WHERE cu.country_id = co.country_id' -
) ;

column statement format a70 word
set long 999


SELECT script_type as type, statement
FROM   DBA_TUNE_MVIEW
WHERE  task_name = :name_02
ORDER BY script_type, action_id; 