Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please write in MySQL EMPLOYEE ( EmployeeID, LastName, FirstName, CellPhone, Exp

ID: 3678300 • Letter: P

Question

Please write in MySQL

EMPLOYEE ( EmployeeID, LastName, FirstName, CellPhone, ExperienceLevel )

Write SQL statements to switch the values of ExperienceLevel in EMPLOYEE so that all rows currently having the value Junior will have the value Senior, and all rows currently having the value Senior will have the value Junior. (Hint: it may take more than 1 statement.)

Enter your answer below

EmployeeID LastName FirstName CellPhone ExperienceLevel 1 Smith Sam 206-254-1234 Master 2 Evanston John 206-254-2345 Senior 3 Murray Dale 206-254-3456 Junior 4 Murphy Jerry 585-545-8765 Master 5 Fontaine Joan 206-254-4567 Senior

Explanation / Answer

Step-1:(update to intermediate value to identify becozif we make directly Senior we cannot identify the difference between newly added and previous ones)

Update the EMPLOYEE so that all rows currently having the value Junior will have the value JuniortoSenior.

update EMPLOYEE set ExperienceLevel='JuniortoSenior' where ExperienceLevel='Junior'.

Step-2:(update to intermediate value)

Update the EMPLOYEE so that all rows currently having the value Senior will have the value SeniortoJunior.

update EMPLOYEE set ExperienceLevel='SeniortoJunior' where ExperienceLevel='Senior'.

Step-3:

update EMPLOYEE set ExperienceLevel='Junior' where ExperienceLevel='SeniortoJunior'.

update EMPLOYEE set ExperienceLevel='Senior' where ExperienceLevel='JuniortoSenior'.

Final result gives us the solution