July 2010
Intermediate to advanced
840 pages
16h 33m
English
The temporary table can be used with SQL/PSM code to hold intermediate results rather than requerying or recalculating them over and over. The syntax for creating a TEMPORARY TABLE is:
CREATE [GLOBAL | LOCAL] TEMP[ORARY] TABLE <table name> (<table element list>) ON COMMIT [PRESERVE | DELETE] ROWS;
This is just like the usual CREATE TABLE statement, with the addition of two pieces of syntax. The <table element>s can be column declarations, constraints, or declarative referential integrity clauses, just as if this were a base table. The differences come from the additional clauses.
The GLOBAL option in the TEMPORARY means that one copy of the table is available to all the modules of the application program in ...
Read now
Unlock full access