SQL AND Operator
Syntax
The AND operator in SQL is used to combine two or more conditions. All conditions must be TRUE for a row to be included in the result.
SELECT column1, column2FROM table_nameWHERE condition1 AND condition2;Example
-- Using a single ANDSELECT name, departmentFROM employeesWHERE age > 30 AND department = 'HR';/* Output:| name | department ||-------------|------------|| Alice Brown | HR |*/
-- Using two ANDsSELECT name, departmentFROM employeesWHERE age > 30 AND department = 'HR' AND salary > 50000;/* Output:| name | department ||-------------|------------|| Alice Brown | HR |*/