You are on page 1of 11

Problematic Statements

Negations in the WHERE Condition

Optimizing Statements

Favor the Use of Indexes

Using UP TO n ROWS

Aggregation

Accessing Multiple Tables


Nested SELECT Statements and Join Formation

An INNER JOIN corresponds to the result set that only considers the records from
the outer table for which suitable data records exist in the inner table (on the left
in the above example).
A LEFT OUTER JOIN corresponds to the result set that contains all the
records from the outer table, regardless of whether or not suitable records
exist in the inner table. If no suitable records exist in the inner table, the
fields of the inner table are set to ZERO values in the result set. The tables
involved in a JOIN are called base tables. On the result of a join you can
then perform a projection (column selection) or a selection (line selection).
As not all databases supported by SAP support the standard syntax for ON conditions,
syntactical restrictions must be executed, which allow only those JOINs that supply
the same resulting quantity on all database systems.
Restrictions on the Outer Join
. Only one table or view can stand to the right of the operator JOIN (not another
JOIN expression)
. Only AND can be used as a logical operator in an ON condition
. Every comparison in the ON condition must contain a field from the right-hand
table
. None of the fields in the table on the right can appear in the WHERE conditions
of the LEFT OUTER JOIN
. You can find further notes on implementing Joins in the ABAP documentation

You might also like