Write about AND, OR and NOT operator
Answers
Answer:
Boolean Operators are simple words (AND, OR, NOT or AND NOT) used as conjunctions to combine or exclude keywords in a search, resulting in more focused and productive results. This should save time and effort by eliminating inappropriate hits that must be scanned before discarding.
Explanation:
The SQL AND, OR and NOT Operators
‣ The WHERE clause can be combined with AND, OR, and NOT operators.
‣ The AND and OR operators are used to filter records based on more than one condition:
‣ The AND operator displays a record if all the conditions separated by AND are TRUE.
‣ The OR operator displays a record if any of the conditions separated by OR is TRUE.
‣ The NOT operator displays a record if the condition(s) is NOT TRUE.
SELECT column1, column2, ...
FROM table_name
WHERE condition1 AND condition2 AND condition3 ...;
SELECT column1, column2, ...
FROM table_name
WHERE condition1 OR condition2 OR condition3 ...;
SELECT column1, column2, ...
FROM table_name
WHERE NOT condition;