Select statement for all entries:
SELECT FOR ALL ENTRIES is the best alternative for SELECT WITH JOINS,
this statement is very helpful for reading data from more than 2 tables.
The load on database will be very less.
Ensure before using SELECT FOR ALL ENTRIES
-
Parent internal table must not be empty ( If it is empty, where condition fails and it will get all records from database).
- Remove all duplicate entries in parent internal table.
Syntax:
SELECT Table_FIELDS FROM DBTBL1 INTO TABLE ITAB1
WHERE <CONDITION>.
SELECT TABLE_FIELDS FROM DBTBL2 INTO ITAB2 FOR ALL ENTRIES IN ITAB1
WHERE TABLE_FIELD1 = ITAB1-TABLE_FIELD1.
Comments
Post a Comment