| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> How to avoid a temporary table
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
![]() |
![]() |