1. Display employee number, name, and dept no of employee Blake.
SELECT EMPNO , ENAME , DEPTNO FROM EMP WHERE ENAME = ‘BLAKE';
2. Display the head of the company, who has no manager.
SELECT ENAME FROM EMP WHERE MGR IS NULL;
3. Display the employee number, name, sal, and salary increase by
15% expressed as a whole number.
SELECT EMPNO, ENAME, SAL, ROUND(SAL*1.15, @) AS increased_salary
FROM EMP;
4. List the names and job of all employees who have names exactly 5
characters in length.
SELECT ENAME, job FROM EMP WHERE LENGTH(ENAME)
5. List all employees whose names start with ,M" .
SELECT * FROM EMP WHERE ENAME LIKE 'M&'
6. List all employees who name ends with ,,N‘.
SELECT * FROM EMP WHERE ENAME LIKE 'RN';
7. List the names and job of all employees who have names exactly 5
characters in length and ends with ,,S*.
SELECT ENAME , JOB FROM EMP WHERE LENGTH(ENAME) = 5 AND ENAME LIKE 'XS';
8. Write a query that will display the employee's name
the length of their name, for all employees whose name start with J, A,
or M.
SELECT LENGTH(ENAME) AS "EMPLOYEE'S NAME” FROM EMP WHERE ENAME LIKE 'J%' OR
ENAME LIKE 'A%' OR ENAME LIKE 'M%';
9. List all employees whose job does not start will “CL”.
SELECT * FROM EMP WHERE JOB NOT LIKE ‘CL%";
[email protected] all managers who earn more than Rs. 2500/-.
SELECT * FROM EMP WHERE JOB='MANAGER' AND SAL>2500;
11.List all clerks and salesman who earn more than Rs. 1000/-SELECT * FROM EMP WHERE JOB IN(*CLERK', SALESMAN") AND SAL>1000;