NOT function

The NOT operator is used to exclude certain rows from the results.

It is used with WHERE to reverse a condition, showing only the data that does not match the given criteria.

Syntax

SELECT column1, column2 FROM table_name WHERE NOT condition;

Example Finding students that are NOT in the Computer Science department:

SELECT * FROM Students WHERE NOT Department = 'Computer Science';

Question number:

Up Next: Database Relationships

Donate

About

Privacy Policy

Changelog