- 1, if the operand is zero
- 0, if the operand is 1.
- NULL, If the operand is NULL.
In this article, we will show you, How to use the MySQL Logical Operator NOT in WHERE Clause to filter the data.
In order to explain the NOT operator, we are going to use the below shown data.
MySQL NOT Operator – Command prompt
In this example we will pass Zeros, Ones, and Null values with different combination. This example helps you to understand the Truth table behind the NOT Operator.
-- NOT Operator in MySQL Example SELECT NOT 1; SELECT NOT 0; SELECT NOT NULL; SELECT !1; SELECT !(1 - 1);
MySQL NOT Operator Example
The NOT Operator is used to test user specified condition in WHERE Clause.
-- MySQL NOT Operator Example USE company; SELECT CustID, First_Name, Last_Name, Education, Profession, Yearly_Income, Sales FROM customers WHERE Education != 'High School';
Thank You for Visiting Our Blog