Filtering - 1
~10 mins
Prerequisite
create table employees (id int primary key,name varchar(100) not null,salary int not null);
insert into employees (id,name,salary) values
(1, 'Ramesh',10000),
(2, 'Siva',8000),
(3, 'Naresh',70000);
Task 1: Search Employee with name 'Siva'
select * from employees where name='Siva';
Task 2: Display Employee who gets salary greater than 7500
select * from employees where salary > 7500;
Note: Comparison Operators - >,>=,<,<=, !=
Task 3: Display Employee who gets salary between 5000 and 15000
select * from employees where salary > 5000 and salary < 15000;
select * from employees where salary between 5000 AND 15000;
- Logical Operators - AND,OR,NOT