The 'IS NULL' approach

  • 0

    The following solutions run marginally faster than the NOT IN approach.

    SELECT c.Name AS 'Customers'
        FROM Customers AS c
            LEFT JOIN Orders AS o
                ON c.Id = o.CustomerId
        WHERE o.Id IS NULL;

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.