SQL NOT Operator
Syntax
The NOT operator in SQL is used to reverse the result of a condition. It returns TRUE if the condition is FALSE, and FALSE if the condition is TRUE.
-- Negate a conditionSELECT column1, column2FROM table_nameWHERE NOT condition;Example
-- Exclude a specific departmentSELECT name, departmentFROM employeesWHERE NOT department = 'HR';/* Output:| name | department ||------------|------------|| John Doe | Sales || Jane Smith | Marketing |*/