You cannot alter a temporary table to change its data duration.(drop and recreate) : Temporary Table « Table « Oracle PL / SQL






You cannot alter a temporary table to change its data duration.(drop and recreate)

   

create table employee(
             emp_no                 integer         primary key
);

CREATE GLOBAL TEMPORARY TABLE temp_emp
AS SELECT * FROM employee;

SQL> ALTER TABLE temp_emp ON COMMIT PRESERVE ROWS;
ALTER TABLE temp_emp ON COMMIT PRESERVE ROWS
                     *
ERROR at line 1:
ORA-01735: invalid ALTER TABLE option


   
    
  








Related examples in the same category

1.Create temporary table
2.Create global temporary table from existing table
3.Create global temporary table with 'on commit delete rows' option
4.Temporary tables cannot be forced into logging.
5.Temporary tables support primary keys.
6.Temporary tables do not support foreign keys
7.ORA-14452: attempt to create, alter or drop an index on temporary table already in use
8.Update a TEMPORARY TABLE and check the table it based on
9.create global temporary table on commit delete rows
10.Temporary table on commit preserce and delete
11.drop global temporary table
12.Insert into a temporary with select statement
13.Insert data into the temporary table.
14.truncate a global temporary table
15.Using Temporary Tables
16.Create global temporary table working_emps on commit preserve rows