#WHEN WE DEAL WITH MULTPLE CONDITION
#AND WHEN BOTH THE CONDITIO ARE TRUE
#OR WHEN ANY OF THE STATEMENT IS TRUE

CREATE TABLE employees (
    emp_id INT PRIMARY KEY AUTO_INCREMENT,
    fname VARCHAR(50) NOT NULL,
    lname VARCHAR(50) NOT NULL,
    desig VARCHAR(50) NOT NULL DEFAULT 'Probation',
    dept VARCHAR(50) NOT NULL,
    salary INT NOT NULL DEFAULT 25000
);
-- Inserting 9 tuples into the employees table
INSERT INTO employees (fname, lname, desig, dept, salary) VALUES 
('John', 'Doe', 'Manager', 'HR', 30000),
('Jane', 'Smith', 'Developer', 'IT', 40000),
('Paul', 'Adams', 'Associate', 'Sales', 27000),
('Lucy', 'Brown', 'Cashier', 'LOAN', 23000),
('Ravi', 'Kumar', 'Developer', 'IT', 35000),
('Mina', 'Patel', 'Accountant', 'Finance', 29000),
('Sam', 'Wilson', 'HR Specialist', 'HR', 32000),
('Tina', 'Jones', 'Sales Executive', 'loan', 26000),
('Alex', 'Morris', 'Team Lead', 'IT', 42000);

SELECT * FROM employees WHERE salary = 29000 AND dept = 'finance';

SELECT * FROM employees WHERE salary = 29000 OR dept = 'HR'; # CHECKS BOTH THE CONDTION


SELECT * FROM employees WHERE salary = 29000 OR salary = 26000 or salary = 42000  or dept = 'sales';

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: