INNER JOINis the most used construct in SQL: it joins two tables together, selecting only those row combinations for which a
JOINcondition is true.
For each row fromNote that this condition can be rewritten as this:
table1, select all rows from
table2where the value of field
bis equal to that of field
CROSS APPLYis a Microsoft's extension to SQL, which was originally intended to be used with table-valued functions (TVF's).
The query above would look like this:
For each from
table1, select first