Home›Learn›SQL›AND, OR and NOT
SQL Master CourseBeginner Friendly

AND, OR and NOT

Learn how to combine and negate SQL conditions.

📘 Chapter 12 / 51⏱️ 8–10 Min Read🎯 Beginner Friendly
Course Progress24%

Course Progress

24%

12 / 51 chapters

📖

Theory

Understand the concept step by step

AND requires multiple conditions to be true. OR allows a row when at least one condition is true. NOT reverses a condition. These operators are commonly used with WHERE.
💻

Example

See how the concept works in SQL

SQL
SELECT *
FROM users
WHERE age > 18
AND city = 'Indore';
📤

Output

Understand what the query produces

The query returns users older than 18 who live in Indore.

📝

Practice

Test your understanding

Find users who are older than 18 and belong to a specific city.

❓

MCQs

Check your SQL knowledge

What is the main concept covered in AND, OR and NOT?

A.Combines or negates conditions
B.Creates tables
C.Sorts columns
D.Deletes databases
💼

Interview Questions

Prepare for SQL interviews

1

Interview Question

What does AND do?

2

Interview Question

What does OR do?

3

Interview Question

What is the purpose of NOT?