Explore BrainMass

Explore BrainMass

    Customer Name in Query Results

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    How come I get so many Smiths in this query (using the Week 2 lecture database)? There's only 26 orders and 4 customers named Smith. Yet I get 104 rows as a result?

    SELECT orders.order_numb, customers.customer_last_name
    FROM orders, customers
    WHERE customers.customer_last_name like "smith";

    © BrainMass Inc. brainmass.com March 4, 2021, 7:56 pm ad1c9bdddf


    Solution Preview

    You should use inner join to get having matching records in both ...