IntroToDatabaseLab3_SQLUPDATE

pdf

School

Algonquin College *

*We aren’t endorsed by this school

Course

8110

Subject

Information Systems

Date

Dec 6, 2023

Type

pdf

Pages

4

Uploaded by CaptainEnergyGoose34

Report
LO3-HO3 - SQL UPDATE - Results X Attempt 1 of 3 Written Feb 6, 2023 6:14 AM - Feb 6, 2023 6:20 AM Attempt Score 5/5 - A+ Overall Grade (Highest Attempt) 5/ 5 - A+ Question 1 1/ 1 point Two data items need to change in the Country table for Mexico. 1. The life expectancy of Mexico needs to change from 71.5 to 72.0 and 2. The head of state needs to change to Enrique Pena Nieto The country code for Mexico is MEX. The country code is represented as CODE in the country table in the world database. You may use the world database to verify your answer. ldentify the SQL Statement that will make the change. ¢<"\> UPDATE Country “¢SET( LifeExpectancy, HeadOfState ) = ( 72.0, 'Enrique Pena Nieto' ) WHERE Code = 'MEX'; ~ ) UPDATE Country . SET ( LifeExpectancy, HeadOfState ) = ( 72.0,
'Enrique Pena Nieto' ); () UPDATE City SET ( LifeExpectancy, HeadOfState ) = ( 72.0, 'Enrique Pena Nieto' ) WHERE Code = 'MEX'; Question 2 1/ 1 point It is possible to update more than one data element in an SQL UPDATE statement v () True ) False Question 3 1/ 1 point What is the result of the following statement on the eity Table in the world database? UPDATE City SET Population = 500000; The statement will give an error because the population of a city cannot ~ be exactly 500000. > The statement will set the population of Ottawa to 500000. ¢(> The statement will set the population of all the cities in the city table to ~ 500000. () The statement is incomplete it will give an error. Question 4 1/ 1 point The life expectancy of Ukraine needs to change from 66.0 to 72.5, the country code for Ukraine is UKR. The country code is represented as CODE in the country table in the world database.
You may use the world database to verify your answer. |dentify the command that will make the change. () UPDATE City ~ SET LifeExpectancy = 72.5 WHERE Code = 'UKR'; Qi)MODIFY Country, City SET URK = 'Ukraine' WHERE LifeExpectancy = 66.0; 5ӤUPDATE Country or City SET 'Ukraine' = 190532 WHERE ID = 'UKR'; J() UPDATE Country SET LifeExpectancy = 72.5 Question 5 1/ 1 point The population of the city Pinar del Rio in Cuba needs to change to 190532. The city ID for Pinar del Riois 24109. You may use the world database to verify your answer. |dentify the command that will make the change. \/C"j) UPDATE City SET Population = 190532 WHERE ID = 2419; () UPDATE City SET 'Pinar del Rio' = 190532 WHERE ID = 2419; () UPDATE City " SET ID = 190532
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
WHERE Population = 2419; ()MODIFY City - SET Population = 190532 WHERE ID = 2419; Done