Assignment 1
Assignment 1
26) Find all employees whose names contain the letter m in any case.
select ename from emp where ename like '%m%';
27) Find the employees whose names are 5 characters long and end with n.
select ename from emp where ename like '_____n%';
28) Find the employees who have the letter r as the third letter in their name.
select ename from emp where ename like '__r%';
29) Find all employees hired in month of February (of any year).
select * from emp where hiredate like '____-02-__';
32) Display the name of all employees, and their bonus. Assume each Employee gets a
bonus of 20 percent of his salary subject to the Maximum of Rs. 500.
select ename, sal*0.20 as bonus from emp where sal >=500;
33) Display the name of all employees, and their bonus. Assume each employee gets a
bonus of 20 percent of his salary subject to the Maximum of Rs. 200.
select ename, sal*0.20 as bonus from emp where sal >=200;