Page 1 of 1

23. Suppose that, instead of having just a sellers table, we have two tables: a sellers table and a locations table, and

Posted: Fri Jul 01, 2022 5:37 am
by answerhappygod
23 Suppose That Instead Of Having Just A Sellers Table We Have Two Tables A Sellers Table And A Locations Table And 1
23 Suppose That Instead Of Having Just A Sellers Table We Have Two Tables A Sellers Table And A Locations Table And 1 (120.13 KiB) Viewed 40 times
23 Suppose That Instead Of Having Just A Sellers Table We Have Two Tables A Sellers Table And A Locations Table And 2
23 Suppose That Instead Of Having Just A Sellers Table We Have Two Tables A Sellers Table And A Locations Table And 2 (72.36 KiB) Viewed 40 times
23. Suppose that, instead of having just a sellers table, we have two tables: a sellers table and a locations table, and that the sellers table has a location_id that references the locations table. Also, since Olympus Mons is pretty large, suppose that we've broken it into multiple locations (all of which begin with Olympus). Which of the following WHERE clauses would you use? (5 Points) None of the above is correct O WHERE location_id IN (SELECT id FROM locations WHERE name LIKE "Olympus%") 4 More than one of the above is correct O WHERE location_id = locations["Olympus Mons"] name: WHERE location_id IN locations.name AND locations.name LIKE "Olympus%" Submit
22. Suppose that you have a sellers table, with a location column, and you'd like to update the location of every seller in the table that was in Olympus Mons to now be on Pavonis Mons; which of the following SQL statements is correct? (5 Points) UPDATE sellers(location) WITH "Pavonis Mons" WHERE location LIKE "Olympus%" UPDATE sellers SET location = "Pavonis Mons" WHERE location LIKE "Olympus%"; INSERT INTO sellers(location) VALUES ("Chasm City") WHERE id = 15; More than one of the above is correct None of the above is correct 4
21. Suppose that you have a Sellers table, which has an address field. You'd like to update the address for Chasm City Florists, which has an ID of 15; which of the following is correct? (4 Points) UPDATE sellers(address) WITH "123 Chasm City" WHERE id = 15; UPDATE sellers SET address = "123 Chasm City" WHERE id = 15; INSERT INTO sellers (address) VALUES ("Chasm City") WHERE id = 15; More than one of the above is correct None of the above are correct