tzungshianlin
Programmer
There are two tables:
Investigator (INO, Name, Salary, DNO)
Department (Dnumber, Dname)
They represent for:
Investigator (The identification number for investigator, The name for investigator, Salary, The number for department)
Department (The number for department, The name for department)
The question:
Please write down the SQL:
Focusing on "special" department employee whose salary is less than 30000, and adding additional 5% 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
Can anyone please tell me?
Thanks
Investigator (INO, Name, Salary, DNO)
Department (Dnumber, Dname)
They represent for:
Investigator (The identification number for investigator, The name for investigator, Salary, The number for department)
Department (The number for department, The name for department)
The question:
Please write down the SQL:
Focusing on "special" department employee whose salary is less than 30000, and adding additional 5% 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
Can anyone please tell me?
Thanks