Dear frends,
there are two TABLE A (CUSTOMER_ID) and TABLE B (CUSTOMER_ID,ITEM1,ITEM2,...,ITEM36). Table A stores the permanent customers names. Table B keeps the demand places by any customer in Table A..
I wanted to find out which customers_id only who have not placed demand for items. I was trying do it by Left Join but i cound't...
pls guys help me out.. I m not good at database MYSQL. I want the query for MYSQL.
Thanks with anticipation
Monindra Masia
query to show difference of table A and table b.
Moderator: General Moderators
-
monindra1984
- Forum Newbie
- Posts: 14
- Joined: Wed Mar 18, 2009 10:35 am
Re: query to show difference of table A and table b.
Code: Select all
SELECT DISTINCT customer_id
FROM tbl_customer1
WHERE (
customer_id
) NOT
IN (
SELECT customer_id
FROM tbl_customer2
i have renamed Table A to tbl_customer1 and Table B to tbl_customer2.