Table "Emp" is shown below Write commands in SQL for (i) to (iv) and output for (v) and (vi)
ID |
NAME |
AGE |
ADDRESS |
SALARY |
PHONE |
1 |
Siddharth |
25 |
A-4, Ashok Vihar, Delhi |
62000 |
98110756656 |
2 |
Chavi |
23 |
B-21, Model Town, Mumbai |
71000 |
99113423989 |
3 |
Karan |
26 |
KC-24, North Avenue, Bhopal |
65000 |
98105393578 |
4 |
Raunaq |
22 |
A-152, Gomti Nagar, Lucknow |
89000 |
99101393576 |
5 |
Kunal |
27 |
B-5/45, Uday Park, Delhi |
80000 |
97653455654 |
(i) To display list of all employees below 25 years old.
(ii) To list names and respective salaries in descending order of salary.
(iii) To count the number of employees with names starting with 'K'
(iv) To list names and addresses of those persons who have 'Delhi' in their address.
(v) SELECT Name, Salary FROM Emp where salary between 50000 and 70000;
(vi) SELECT Name, phone from emp where phone like '99%';