943,568 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 594
  • MySQL RSS
Dec 2nd, 2008
0

Display customer data which is not in other table

Expand Post »
What i want to do is display all the customers data which is in the 'customers' table where their 'customers_id' is NOT IN the 'customers_id' field in the 'orders' table.

I hope i made sense!

Thanks,
Billy
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
BillyMako is offline Offline
16 posts
since Jan 2008
Dec 2nd, 2008
0

Re: Display customer data which is not in other table

That should be simple :-

sql Syntax (Toggle Plain Text)
  1. SELECT *
  2. FROM customers
  3. WHERE customers_id NOT IN (
  4. SELECT customers_id
  5. FROM orders
  6. )
Featured Poster
Reputation Points: 653
Solved Threads: 151
Nearly a Posting Virtuoso
stephen84s is offline Offline
1,316 posts
since Jul 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: a simple application
Next Thread in MySQL Forum Timeline: run the multiple select statement





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC