The problem about Relational Database

Status
Not open for further replies.

Marjorieandshian

Completely Banned for the Greater Good
Banned
Joined
Dec 18, 2014
Messages
1
Reaction score
0
Location
Sydney, Australia
There are two tables:

Investigator (INO, Name, Salary, DNO)
Department (Dnumber, Dname)

They represent for:
Investigator (The identification number about investigator, The name for investigator, Salary, The number for department)
Department (The number for department, The name for department)

The question:
Please write down this SQL:
Focusing on the "Special" department employee whose salary is less than 30000, and adding additional 5% for salary.

The answer is:
UPDATE Investigator
SET Salary= Salary*1.05
WHERE EXISTS(
SELECT*
FROM Department
WHERE Department.Dnumber= Investigator.DNO
AND Dname= 'Special' AND Salary<30000

I can't understand this sentence:
WHERE Department.Dnumber= Investigator.DNO
Thank you very much.
 
Status
Not open for further replies.
Top