Question 16
Table Name: College
Relevant Table: College(Professor (Text), Department (text), Salary (INT))
Professor | Department | Salary |
John | Computer Science | 60,000 |
Van der | Mechanical Engineering | 57,500 |
Ackerman | Physics | 45,000 |
Suyash | Mathematics | 52,000 |
Simrit | Computer Science | 56,500 |
Jessica | Computer Science | 55,000 |
Jenny | Personality Development | 50,000 |
QUERY: Each professor in the computer science department got a Rs.10,000 increment. Write a Query that gives the name and new salaries of the computer science department.
Execute: SELECT Professor, Salary + 10000 AS NewSalary
FROM College
WHERE Department = 'Computer Science';
Answer:
Professor | Salary |
John | 70,000 |
Simrit | 66,500 |
Jessica | 65,000 |