Science, asked by StarTbia, 1 year ago

Consider the following “employee” table and write the SQL queries for (i) to (vi) and outputfor (vii) to (x) following SQL queries:EmpNo Name Job Gender Salary DeptNo Commission1001 Reena President F 30000 10 3001002 Shankar Manager M 18000 10 4001003 Meena Manager F 15000 20 3001004 Payal Clerk F 5000 30 100(i) Display the name of those employees whose name contains ‘ee’.(ii) Display the name, salary and deptno of those employees whose salary is in the range 10000 and30000.(iii) Display the details of employees in ascending order of name.(iv) Display all the details of Female Manager and President having salary >10000.(v) Double the commission of those employees working in deptno 20 and 30.(vi) Display the names of employees having exactly four lettered names.(vii) SELECT DISTINCT (job) FROM employee;(viii) SELECT name, job FROM employee WHERE salary>15000;(ix) SELECT * FROM employee WHERE name LIKE ‘_e%’;(x) SELECT name, job, salary FROM employee WHERE gender = ‘F’;

Answers

Answered by aqibkincsem
5
(i) The name of those employees whose name contains ‘ee’ are - Reena and Meena.

(ii) The name, salary and deptno. of those employees whose salary is in the range 10000 and 30000 are the following -Reena - Salary 30,000 - Dept no.10Shankar - Salary 18.000 -Dept no.10Meena - Salary 15,000 - Dept no.20

(iii) and (iv) Details of the employees in ascending order of names including the details of Female employees -Name Job Gender Salary Dept no. Commission

Meena Manager female 15000 20 300
Payal Clerk female 5000 30 100
Reena President female 18000 10 300
Shankar Manager male 30000 10 400.

(vi) No employee has the name consisting four letters.
Similar questions