12-24-2007 12:29 PM
hi
is FOR ALL ENTRIES same as LEFT OUTER JOINS or INNER JOINS?
thanks in advance
bramara
12-24-2007 12:31 PM
For all entries is same as inner join. not left outer join.
If u use for all entries internally it will use select single for the Driving table with the Item Table.
Inner join and left outer join are only different where one of the involved tables does not contain any suitable record that meets the join conditions.
With an inner join (table1 inner join table2), no record is included in the results set in this case. However, this means that the corresponding record from table 1 is not considered in the results set.
In this case, with a left outer join (table1 left outer join table2), exactly one record is included in the results set. In this record, the fields from table1 contain the values of the record from table1, and the fields from table2 are all filled with the initial value.
- Selvapandian Arunachalam
Edited by: Arunachalam, Selvapandian on Dec 24, 2007 8:06 AM
12-24-2007 12:32 PM
Hi,
For all entries is used for only one table. It can be used instead of writing a select inside a loop.
12-24-2007 12:33 PM
Hi Bramara,
The data that can be selected with a view depends primarily on whether the view implements an inner join or an outer join. With an inner join, you only get the records of the cross-product for which there is an entry in all tables used in the view. With an outer join, records are also selected for which there is no entry in some of the tables used in the view.
The set of hits determined by an inner join can therefore be a subset of the hits determined with an outer join.
Database views implement an inner join. The database therefore only provides those records for which there is an entry in all the tables used in the view. Help views and maintenance views, however, implement an outer join.
Kanagaraja L
12-24-2007 1:31 PM
Hi Bramara,
Please check:
http://blogs.ittoolbox.com/sap/db2/archives/for-all-entries-vs-db2-join-8912
and
JOINS vs. FOR ALL ENTRIES - Which Performs Better?
/people/rob.burbank/blog/2007/03/19/joins-vs-for-all-entries--which-performs-better
JOINs almost always outperform FOR ALL ENTRIES
and go through below thread ...
will really help u a lot..
Hope it will solve ur doubt..
Thanks & Regards
ilesh 24x7