Sie sind auf Seite 1von 1

SEATWORK:

Dept

Deptno Dname Loc


10 ACCOUNT New York
20 ADMIN California
30 IT Detroit

Emp

Empno Ename Job Salary Comm Hiredate Deptno Experience


11999 SCOTT MANAGER 45000 0 12-Jan-00 10 20
12000 BLACK ACCOUNTANT 20000 1500 13-Feb-00 10 13
12001 SMITH ASS ACCOUNTANT 15000 1200 24-Jan-00 10 7
12002 KING OPERATOR 8000 1200 15-Mar-00 20 1
12003 RED SN OPERATOR 10000 0 16-Apr-00 20 2
12004 KAT SOFTWARE ENGINEER 35000 0 17-Nov-00 30 3
ASS SOFTARE 2
12005 MICHLE ENGINEER 25000 0 18-Jan-00 30
DATA ENTRY 1
12006 MAKD OPERATOR 9000 0 1-Jan-00 20

Write SQL Statements to perform the following query tasks:

A) Display all records of the employee’s table.


B) Display the employee name, salary, and commission of those
Employee’s salaries Higher than 1500.
C) Display the employee name, salary, job and commission of those employees
in which their Employee’s commission is null.
D) Display the employee’s name, employee number, salary, job and
Commission of an Employee if his salary is higher than Scott’s salary.
E) Display Department name, location and employee name of those
Employee’s who are working in the Account Department.
F) Display name, job, salary of those employees who are highest paid.
G) Display name, job, salary of those employees who are lowest paid.
H) Display the Department name, employee name and salary from
Employee tables.
J) Write the query to display the Department names and their employee’s
names.
K) Display all employees name, job and salary that belongs to
department 10.
L) Show the records of all employees having their last letter in the
their name is ‘H’.
M) Get the total salaries of the all employees according to the department.
N) Delete all employee who belongs to Scott’s Department.
O) Delete all records if their salaries are higher than 1500;
P) Display the highest salary from Account Department.
Q) Display the lowest salary from Account Department.
R) Display all records if their commission is null.

Das könnte Ihnen auch gefallen