MySQL Chapter 3 Quiz
Which of the following would return a maximum of 7 rows, starting with the 4th row? LIMIT 7, 4 LIMIT 4, 7 LIMIT 4 LIMIT 4, 6
LIMIT 4, 7
When you code a SELECT statement, you must code the four main clauses in the following order SELECT, FROM, ORDER BY, WHERE SELECT, ORDER BY, FROM, WHERE SELECT, WHERE, ORDER BY, FROM SELECT, FROM, WHERE, ORDER BY
SELECT, FROM, WHERE, ORDER BY
Which of the following WHERE clauses will return vendor names from A to C? WHERE vendor_name = D WHERE vendor_name < 'D' WHERE vendor_name = 'D' WHERE vendor_name < 'C'
WHERE vendor_name < 'D'
Which of the following expressions does not compute 10% of the balance due if balance due is the invoice total minus the credit total minus the payment total? a) invoice_total - credit_total - payment_total / 10 b) (invoice_total - payment_total - credit_total) / 10 c) (invoice_total - (payment_total + credit_total)) * 0.10 d) ((invoice_total - payment_total) - credit_total) / 10
a) invoice_total - credit_total - payment_total / 10
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 b) NOT (invoice_total > 1000) c) invoice_total IN (0, 1000) d) invoice_total BETWEEN 0 AND 1000
c) invoice_total IN (0, 1000)
When you code an ORDER BY clause, you can specify a a) column name or alias only b) column name or expression only c) column name, alias, or expression only d) column name, alias, expression, or column number
d)
When coded in a WHERE clause, which search condition will return invoices when payment_date isn't null and invoice_total is greater than or equal to $500? a) payment_date IS NULL AND invoice_total > 500 b) payment_date IS NOT NULL OR invoice_total >= 500 c) NOT (payment_date IS NULL AND invoice_total <= 500) d) payment_date IS NOT NULL AND invoice_total >= 500
d) payment_date IS NOT NULL AND invoice_total >= 500
Which of the following isn't a valid column alias? total total sales total_sales "Total Sales"
total sales
When coded in a WHERE clause, which of the following would not return rows for vendors in the cities of San Diego and Santa Ana? vendor_city LIKE 'SAN%' vendor_city REGEXP 'NA$' vendor_city REGEXP '^SA'
vendor_city REGEXP 'NA$'