Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SQL 2. (6 points) Consider the following SQL query on the relation Product (pid, name, price, mfgr): SELECT FROM Product P WHERE NOT (P.price >
SQL
2. (6 points) Consider the following SQL query on the relation Product (pid, name, price, mfgr): SELECT FROM Product P WHERE NOT (P.price > 500) OR NOT (P.migr = 'Sears') For each of the following tuples in the Product relation, indicate the value the where clause in the above query would return (you should answer "true", "false" or "null"). a) (10, 'Hammer', 500, 'Scars'): b) (11. Hammer', null, Sears'): c) (12, 'Hammer', 600, Target"): 3. Multiple Choice (10 points, 2 points each) (1) Which is NOT true about the USING keyword? a. you use it to simplify the syntax for joining tables you code a USING clause in addition to the ON clause C. it can be used with inner or outer joins d. the join must be an equi-join, meaning the equals operator is used to compare the two columns (2) In a cross join (or Cartesian product), all of the rows in the first table are joined with all of the a. distinct rows in the second table matched rows in the second table unmatched columns in the second table rows from the second table d. (3) When coded in a WHERE clause, which of the following search conditions will NOT return a result set that includes all invoices with an invoice_total value of $1000 or less? a. invoice_total 1000) C. invoice_total IN (0, 1000) d. invoice_total BETWEEN 0 AND 1000 (4) Which of the following WHERE clauses will return vendor names beginning with letters from A to C? a. WHERE vendor_name BETWEEN 'A' AND 'C b. WHERE vendor_name
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started