"if you encounter any errors in SAP, send me a screenshot at pramod@learntosap.com, and I will help you resolve the issue."

SQL WHERE clause Statement

SQL TUTORIALS-

SQL WHERE clause Statement

Introduction-


Trulli Trulli

πŸ” What is the WHERE Clause?βœ…WHERE clause in SQL is used to filter records. commonly used in SELECT, UPDATE, DELETE, and INSERT statements to limit the data affected by the query. The condition can include operators like =, >, <, BETWEEN, LIKE, IN, IS NULL, and logical operators like AND, OR, NOT.


βœ… Basic Example1:-Select customers from USA


SELECT *  
FROM Customers  
WHERE Country = 'USA';

βœ…Result Show :-

Emoji Examples in HTML

Customers


CustomerID Name Country
1 ANNI USA
2 SUJAN USA
3 BOULT USA

βœ… Example:- Select orders made in 2025:-

βœ…SELECT Query :-


SELECT ProductName, Price  
FROM Products  
WHERE Price > 50;

βœ…Result Show :-

Emoji Examples in HTML

Products

ProductName Price
Laptop 90000
Mobile 70000

βœ… Example -Select employees from "Sales" department:-

βœ…SELECT Query :-


SELECT Name, Department  
FROM Employees  
WHERE Department = 'IT';

βœ…Result Show :-

Emoji Examples in HTML

Employees

Name Department
Pramod IT
Pooja IT
Rajesh IT
Rupesh IT

βœ… Example 4: Select orders made in 2025:-

βœ…SELECT Query :-


SELECT *  
FROM Orders  
WHERE OrderDate BETWEEN '2025-02-01' AND '2025-11-30';

βœ… Example -SELECT DISTINCT job titles from an Employees table:-

βœ…SELECT Query :-

SELECT DISTINCT Name, Department FROM Employees;

βœ…Example -Employees hired after 2025-

βœ…SELECT Query :-


SELECT *
FROM Employees
WHERE HireDate > '2025-01-01';

May Be Like Important Link-

-Chart Of Account-OB13

-Define Plant-OX1

-Chart Of Account-OB13

-Define Financial Statement