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

SQL AND Operator Statement

SQL TUTORIALS-

SQL AND Operator Statement

Introduction-


Trulli Trulli

AND operator in SQL is used to combine two or more conditions in a WHERE clause. All conditions must be true for a row to be included in the result set...


✅ Example:- Select employees from IT department AND salary above 50000:


SELECT * FROM Employees
WHERE Department = 'IT' AND Salary > 10000;

Result Show :-

Emoji Examples in HTML

🔸 Example Table: Employees


ID Name Salary City
1 ANNI IT 10000
5 POOJA IT 90000

✅ Example:- Employees in HR department AND city is Pune:-

SELECT Query :-


SELECT * FROM Employees
WHERE Department = 'HR' AND City = 'Pune';

Result Show :-

Emoji Examples in HTML

🔸 Example Table: Employees

ID Name Department Salary City
3 RAJ IT 5000 Pune

✅ Example -IT employees in Pune with salary less than 10000:-

SELECT Query :-


SELECT * FROM Employees
WHERE Department = 'IT' AND City = 'Pune' AND Salary < 10000;

Result Show :-

Emoji Examples in HTML

🔸 Example Table: Employees

ID Name Department Salary City
1 ANNI IT 10000 Pune
2 POOJA IT 90000 Pune
3 RAJ IT 5000 Pune

✅ Example -SQL Query Using AND and OR:-

SELECT Query :-


SELECT *
FROM Employees
WHERE Department = 'IT'
  AND (Salary > 9000 OR Name = 'POOJA');

Result Show :-

Emoji Examples in HTML

🔸 Example Table: Employees

ID Name Department Salary City
2 POOJA IT 9000 Pune

May Be Like Important Link-

-Chart Of Account-OB13

-Define Plant-OX1

-Chart Of Account-OB13

-Define Financial Statement