Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

give the screenshot of these code from the SQL 1 - List the Names and Jobs of all employees whose Manager is employee number 7

give the screenshot of these code from the SQL
1-List the Names and Jobs of all employees whose Manager is employee number 7698.
Code:
SELECT e.Ename AS "Employee Name", e.Job AS "Job"
FROM EMPLOYEES e
WHERE e.MGR =7698;
2-List the details of all employees hired in 1982(use LIKE in the query).
Code:
SELECT employee_id, last_name, hire_date
FROM employees
WHERE hire_date LIKE '%1982%';
3-Produce a list of all employees whose job titles have 'ES' in them, showing empno,
ename, job
Code:
SELECT empno, ename, job
FROM employees
WHERE job LIKE '%ES%';
4-List the employees whose names either start with 'A' or end with 'S'.
Code:
SELECT employee_name
FROM employees
WHERE employee_name LIKE 'A%' OR employee_name LIKE '%S'
ORDER BY employee_name;
5-List the department name and city of all departments that have the letter 'E' in their
department's name.
Code:
SELECT department_name, city
FROM departments d
JOIN locations 1 ON d.location_id = l.location_id
WHERE department_name LIKE '%E%';
6-Produce a list of all employees who are either Analysts, Managers or Clerks (Use IN in
the query)
Code:
SELECT empno, ename, job
FROM employees
WHERE job IN ('ANALYST', 'MANAGER', 'CLERK');
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students also viewed these Databases questions