19. Suppose you would like to delete every product from a products table that has the seller_id for Quicksell Corporatio
Posted: Fri Jul 01, 2022 5:37 am
20. Suppose you have a sellers table, which has name, address, and ID columns, specified in that order, only ID has a default value, and none of them can be null. Which of the following statements is not valid? (4 Points) A INSERT INTO sellers (name, address) VALUES ("Arc-Royal Heavy Industries", "Arc-Royal"); INSERT INTO sellers VALUES ("Pathfinder Gate Services", "Pathfinder City", DEFAULT); INSERT INTO sellers VALUES (name: "Risa Tours LLC", address: "Risa", id: DEFAULT); INSERT INTO sellers (id, address, name) VALUES (55, "Chasm City", "In-Town Landscaping");
18. Suppose you would like to delete every product from a products table that has a seller_id of 15. Which of the following statements is correct? (4 Points) DELETE product FROM products WHERE seller_id = 15; DROP FROM products WHERE seller_id == 15; DELETE FROM products WHERE seller_id = 15; DELETE FROM products WHERE seller_id <> 15:
17. Suppose that a store has a buyers table and an orders table; the orders table has a foreign-key constraint, such that every order has a buyer, but not every buyer has an order. Now suppose that you want to see a list of every buyer, whether they have orders or not, together with any orders they might have; how should you combine these tables? (3 Points) A SEARCH statement with a FROM clause A SELECT statement from the buyers table, using a FOR-EACH clause for filtering. A SELECT statement from the buyers table, inner-joined with the orders table. A SELECT statement from the buyers table, left-outer-joined with the orders table.
16. Suppose that a store has a buyers table and an orders table; the orders table has a foreign-key constraint, such that every order has a buyer, but not every buyer has an order. Suppose you wanted a list of every buyer and their orders, but you don't want to see buyers that don't have orders; how should you combibe these tables? (3 Points) A SEARCH statement with a FROM clause A SELECT statement from the buyers table, using a FOR-EACH clause for filtering. A SELECT statement from the buyers table, inner-joined with the orders table. A SELECT statement from the buyers table, left-outer-joined with the orders table.
14. Consider the following two SQL snippets, referring to a database for a hypothetical store: SELECT products.name, seller.name FROM products INNER JOIN sellers ON products.seller_id = sellers.id; SELECT products.name, seller.name FROM products. RIGHT OUTER JOIN sellers ON products.seller_id = sellers.id; Assume that products.seller_id is a foreign key referring to sellers.id, also assume that all products have sellers, but not all sellers have products. Will these two queries produce the same results? (4 Points) The two queries will produce the same results. The first query will produce rows that the second query won't. The second query will produce rows that the first query won't. Each query will produce rows that the other won't. There isn't enough information to tell.