In this section, we will see on the NOT operator function for.
The NOT Operator is used to reserve the Boolean value of particular expression.

The NOT operator is ordinarily used to exclude the data with certain conditon from the results display.

The SQL syntax for the NOT operator is:

SELECT [COLUMN NAME] FROM [TABLE NAME]
WHERE NOT [CONDITION]

In detailed syntax, the SQL syntax can be like this

SELECT [COLUMN NAME] FROM [TABLE NAME]
WHERE NOT [COLUMN] = [VALUE]


EXAMPLE :

We would like to exclude IT department from the data displaying.

Table GameScores

PlayerNameDepartmentScores
JasonIT3000
IreneIT1500
JaneMarketing1000
DavidMarketing2500
PaulHR2000
JamesHR2000

SQL statement :

SELECT * FROM GameScores
WHERE
NOT Department = 'IT'

Result:

PlayerNameDepartmentScores
JaneMarketing1000
DavidMarketing2500
PaulHR2000
JamesHR2000