You can use NOT NULL, NOT LIKE, NOT IN, or NOT BETWEEN. For example:
WHERE YEARS IS NOT NULL
It is only in these cases that NOT can follow the entire condition.
Examples:
SELECT ID, NAME, SALARY FROM Q.STAFF WHERE SALARY NOT BETWEEN 17000 AND 21000
SELECT ID, NAME, SALARY, COMM FROM Q.STAFF WHERE NOT (SALARY < 18000 AND COMM < 500)
SELECT ID, NAME, DEPT FROM Q.STAFF WHERE JOB = 'MGR' AND ID NOT IN (SELECT MANAGER FROM Q.ORG)