How to Work with NOT Logical Operator in SQL
In this article I am going to explain how to work with NOT logical Operator in SQL.
In this article I am going to explain how to work with logical operator in SQL. Logical operator in SQL create compound condition. This compound statement in SQL consist of two or more conditions. We use Logical operator with WHERE clause. We use it to find the specific record into result set from table stored in database. It is used to fetch specific row or specific record based on comparison.
There are three type of comparison operator in SQL server.
- AND Logical Operator
- OR Logical Operator
- NOT Logical Operator
NOT Logical Operator
NOT logical operator is used to negate a condition. We use logical operator, when we want to find rows that does not satisfy a condition.
SELECT * FROM dbo.mcninvoices
WHERE NOT invoicetotal< 1000