Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

for all entries

Former Member
0 Kudos

hi

is FOR ALL ENTRIES same as LEFT OUTER JOINS or INNER JOINS?

thanks in advance

bramara

4 REPLIES 4

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

For all entries is used for only one table. It can be used instead of writing a select inside a loop.

Kanagaraja_L
Active Contributor
0 Kudos

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

former_member387317
Active Contributor
0 Kudos

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