2007 Jul 12 11:03 AM
2007 Jul 12 11:24 AM
Hi sai,
1. INNER JOIN
<b>DBTAB1 <----
> DBTAB2</b>
It is used to JOIN two tables
having some COMMON fields.
2. Whereas
For All Entries,
DBTAB1 <b><----
> ITAB1</b>
is not at all related to two tables.
It is related to internal table.
3. If we want to fetch data
from some DBTABLE1
but we want to fetch
for only some records
which are contained in some internal table,
then we use for alll entries.
regards,
amit m.
2007 Jul 12 11:06 AM
inner joins are used to select the data from different tables into an internal table. where as for-all entries are used to select the data from a table and then to select the data from another table based on the previously retreived data..
2007 Jul 12 11:06 AM
Hi
The WHERE clause of the SELECT statement has a special variant that allows you to derive conditions from the lines and columns of an internal table:
SELECT ... FOR ALL ENTRIES IN <itab> WHERE <cond> ...
<cond> may be formulated as described above. If you specify a field of the internal table <itab> as an operand in a condition, you address all lines of the internal table. The comparison is then performed for each line of the internal table. For each line, the system selects the lines from the database table that satisfy the condition. The result set of the SELECT statement is the union of the individual selections for each line of the internal table. Duplicate lines are automatically eliminated from the result set. If <itab> is empty, the addition FOR ALL ENTRIES is disregarded, and all entries are read.
The internal table <itab> must have a structured line type, and each field that occurs in the condition <cond> must be compatible with the column of the database with which it is compared. Do not use the operators LIKE, BETWEEN, and IN in comparisons using internal table fields. You may not use the ORDER BY clause in the same SELECT statement.
You can use the option FOR ALL ENTRIES to replace nested select loops by operations on internal tables. This can significantly improve the performance for large sets of selected data.
<b>Reward points for useful Answers</b>
Regards
Anji
2007 Jul 12 11:08 AM
we use for all entries for optimization
if we want to fetch the corresponding values from a database with relate to an internal table , we can use for all entries.
2007 Jul 12 11:15 AM
hi,
For all entries are used insted of inner joins both will be used for getting data from multiple tables.
If u use for all entries insted of inner join performance will be improved.
2007 Jul 12 11:24 AM
Hi sai,
1. INNER JOIN
<b>DBTAB1 <----
> DBTAB2</b>
It is used to JOIN two tables
having some COMMON fields.
2. Whereas
For All Entries,
DBTAB1 <b><----
> ITAB1</b>
is not at all related to two tables.
It is related to internal table.
3. If we want to fetch data
from some DBTABLE1
but we want to fetch
for only some records
which are contained in some internal table,
then we use for alll entries.
regards,
amit m.
2007 Jul 12 11:37 AM
INNER-JOINS AND FOR-ALL-ENTRIES BOTH ARE USED TO JOIN 2 TABLES AND GET DATA FROM THAT 2 TABLES
BUT IN THE PERFORMANCE WAY FOR-ALL-ENTRIES IS BETTER THAN INNER-JOIN
IF YOU USE 2 OR 3 TABLES INNER-JOIN IS OK , BUT IF USE MORE THAN THAT IT WILL CREATE PERFORMANCE ISSUE FOR YOU
BUT IN FOR ALL ENTRIES YOU CAN JOIN ANY NUMBER OF TABLES
YOU WON'T GET ANY PERFORMANCE ISSUE IN THIS
REGARDS
NARESH