Your query is
SELECT REGISTRATIONNO FROM VEHICLE_MASTER WHERE REGISTRATIONNO
NOT IN (SELECT REGISTRATIONNO FROM VEHICLE_SUPERUSER where superuserid='demo')
So, what you are saying is
"Show me
all the records from VEHICLE_MASTER except for those records that exist in VEHICLE_SUPERUSER where the superuserid is 'demo'"
Going by what you say here..
it should display the 'not in' values alone, but its displaying all values
..the NOT IN syntax isn't what you want. If you want to display
only those values, then you should use something like
SELECT
*
FROM VEHICLE_MASTER
WHERE REGISTRATIONNO
IN (SELECT REGISTRATIONNO FROM VEHICLE_SUPERUSER where superuserid='demo')