Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How to avoid a temporary table

How to avoid a temporary table

From: Peter Mutsaers <plm_at_gmx.li>
Date: 23 Oct 2003 05:50:05 -0700
Message-ID: <9769adc8.0310230450.4a46090d@posting.google.com>


Hello,

Often I have seen opinions in this group that temporary tables are not necessary and can always be avoided. I don't like (the oracle way of) temporary tables and would like to avoid them, if possible. However I feel that often they are unavoidable in order to "modularize" SQL, i.e. avoid multiple occurrance of similar pieces of SQL.

I know that you can always rewrite a temporary table as a subquery. Often however, you end up using multiple subqueries that are very similar, i.e. duplication of "code", that you avoid in "normal" programming languages by using subfunctions that calculate intermediate results and store these.

Am I missing some approach or method to avoid code duplication without resorting to temporary tables? Received on Thu Oct 23 2003 - 07:50:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US