Update a TEMPORARY TABLE and check the table it based on : Temporary Table « Table « Oracle PL / SQL






Update a TEMPORARY TABLE and check the table it based on

   


create table employee(
         emp_no                 integer         primary key
        ,salary                 number(3)
        ,title                  varchar2(20)
);

CREATE GLOBAL TEMPORARY TABLE temp_emp
      ON COMMIT PRESERVE ROWS
      AS SELECT * FROM employee;

UPDATE temp_emp SET salary = 99
    WHERE title = 'Designer';

select * from employee where title = 'Designer';

SELECT salary FROM temp_emp
    WHERE title = 'Designer';


drop table temp_emp;
drop table employee;


   
    
  








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.You cannot alter a temporary table to change its data duration.(drop and recreate)
8.ORA-14452: attempt to create, alter or drop an index on temporary table already in use
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