Lets say i have 1 Table only with multiple columns. Lets say:
Fruits
--------------------------------------
id | name | country
--------------------------------------
1 | Banana | china
2 | Orange | japan
3 | Apple | japan
4 | Apple | china
5 | Banana | usa
6 | Orange | china
Then the simple query to SELECT all Fruits where id < 6.
It is:
SELECT * FROM fruits WHERE id < 6
Then it will return:
--------------------------------------
id | name | country
--------------------------------------
1 | Banana | china
2 | Orange | japan
3 | Apple | japan
4 | Apple | china
5 | Banana | usa
Then by appending above query, how can i go on to EXCLUDE something more.
For example:
Do NOT want to see, any "APPLE" from "CHINA".
So the final result must be:
--------------------------------------
id | name | country
--------------------------------------
1 | Banana | china
2 | Orange | japan
3 | Apple | japan
5 | Banana | usa
This is again without the row that having if, name='Apple' AND country='china' TOGETHER!.
- So by continuing the first query, how can i ADD the Additional "AND Condition Pair" to get this result, please?
I would say:
SELECT * FROM fruits WHERE id < 6 ... AND DON'T RETURN this condition where name='Apple' and country='china' TOGETHER