Reviewed by Aditya Kumar · Last reviewed 2026-03-24
**CROSS APPLY**: Invokes table-valued function/subquery per row; like INNER JOINâexcludes rows where function returns nothing. **OUTER APPLY**: Like LEFT JOINâkeeps all left rows, NULL where function returns nothing. **Use**: Correlated subqueries, JSON parsing, string...
Pro-Move: 'We use CROSS APPLY for JSON parsing in SQL Serverâmoved from 10 UDF calls to single APPLY; 3Ă faster.' Red Flag: Using APPLY for set-based operationsâoften a JOIN is better.
CROSS APPLY: Invokes table-valued function/subquery per row; like INNER JOINâexcludes rows where function returns nothing. OUTER APPLY: Like LEFT JOINâkeeps all left rows, NULL where function returns nothing. Use: Correlated subqueries, JSON parsing, string splitting. PostgreSQL: LATERAL JOIN (CROSS JOIN LATERAL, LEFT JOIN LATERAL). Performance: Can be expensiveârow-by-row. Prefer set-based when possible. Best practice: Use when row-by-row needed; avoid for large tables without indexing.
Pro-Move: 'We use CROSS APPLY for JSON parsing in SQL Serverâmoved from 10 UDF calls to single APPLY; 3Ă faster.' Red Flag: Using APPLY for set-based operationsâoften a JOIN is better.
According to DataEngPrep.tech, this is one of the most frequently asked General/Other interview questions, reported at 1 company. DataEngPrep.tech maintains an editor-reviewed database of 1,863 data engineering interview questions across 7 categories.