• Who is the listed president of Guatemala?

select HeadOfState from Country Where Name="Guatemala";

  • Change the president of Guatemala to "Otto Pérez Molina". Show the result.

UPDATE Country SET HeadOfState = "Otto Perez Molina" Where Name ="Guatemala";

  • Create a temporary table called oceania made up of all countries in Oceania.

CREATE Table Oceania engine=MEMORY as select * from Country where Continent ="Oceania";

  • The ice is melting, and the water is rising, covering more land. Decrease the surface area of all countries in the new Oceania table by 5%. List the before and after results.

update Oceania set SurfaceArea =SurfaceArea *.95;

  • In the new table, drop all countries with less than 100 Square Miles. How many did you lose?

delete from Oceania where SurfaceArea < 100;

  • Insert into the new Oceania table a country called "Boatland", with all the other fields made up, and suitably amusing. Show the resulting row.

  • Drop the Oceania table.

drop table Oceania;

Topic revision: r1 - 2013-10-22 - JimSkon
 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback