MySQL Chapter 3 Quiz

MySQL Chapter 3 Quiz

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

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

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

1

Favorites

0

Last updated

6 years ago

Date created

Mar 14, 2020

Cards (10)

Section 1

(10 cards)

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

Front

c) invoice_total IN (0, 1000)

Back

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

Front

LIMIT 4, 7

Back

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

Front

SELECT, FROM, WHERE, ORDER BY

Back

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'

Front

WHERE vendor_name < 'D'

Back

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'

Front

vendor_city REGEXP 'NA$'

Back

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

Front

d)

Back

The order of precedence for the logical operators in a WHERE clause is Not, And, Or And, Or, Not Or, And, Not Not, Or, And

Front

Back

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

Front

d) payment_date IS NOT NULL AND invoice_total >= 500

Back

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

Front

a) invoice_total - credit_total - payment_total / 10

Back

Which of the following isn't a valid column alias? total total sales total_sales "Total Sales"

Front

total sales

Back