INNER JOIN not working?

  • 0

    Seems like this query should work since an INNER JOIN should require an entry in both tables, no?

    SELECT Customers.Name as Customers
    FROM Customers
    INNER JOIN Orders ON Customers.Id = Orders.CustomerId;

    However it fails when I run it.

  • 1

    Because your outcome is Customers.Id = Orders.CustomerId;
    However the request is that Customers.Id is not in Orders.CustomerId

Log in to reply

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