``++SELECT++`` with ``++JOIN++`` always performs better than nested selects.


== Noncompliant Code Example

[source,abap]
----
SELECT * FROM SPFL INTO SPFLI_WA.
  SELECT * FROM SFLOGHT INTO SFLIGHT_WA
    WHERE CARRID = SPFLI_WA-CARRID
    AND CONNID = SPFLIGHT_WA_CONNID.
  ENDSELECT.
ENDSELECT.
----


== Compliant Solution

[source,abap]
----
SELECT * INTO WA
  FROM SPFLI AS P INNER JOIN SFLIGHT AS F
    ON P~CARRID = F~CARRID AND
        P~CONNID = F~CONNID.
END-SELECT.
----

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

include::message.adoc[]

endif::env-github,rspecator-view[]
