Sorry if my question was stupid or basic.I trying to get not exist id records from db. But it is showing all records.
---------------------+
id | name | age |
---------------------+
1 | ase | 33 |
3 | ase | 33 |
4 | ase | 33 |
5 | ase | 33 |
7 | ase | 33 |
9 | ase | 33 |
---------------------+
i tried something like this
SELECT * FROM tablename WHERE id NO IN ('1','2','4','5','6','7') but it showing all records. In this given query id 2,6 are not exist in table show i need to show them as result. please some one help me to solve this. thanks
expecting output like
----------------------+
id not exist in table |
----------------------+
2 |
6 |
----------------------+
from the given IN statement this ID are not exist in TABLE something like this. I need to show id which are not exist in table as result.