CSC301 chpt 3 - quiz ?

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

To search for null values, use the ____ clause.

IS NULL

To return all of the columns from the base table, you can code the ___ operator in the SELECT clause.

*

To concatenate character strings, you use the ___ function in a string expression.

CONCAT

To prevent duplicate rows from being returned by a SELECT statement, you can code the ___ keyword in the SELECT clause.

DISTINCT

The ___ clause of the SELECT statement specifies the table that contains the data.

FROM

To retrieve rows in which an expression matches a string pattern called a mask, you can use the ___ keyword followed by the mask.

LIKE

Which of the following would return a maximum of 7 rows, starting with the 4th row?

LIMIT 4, 7

The order of precedence for the logical operators in a WHERE clause is

Not, And, Or

Which of the following WHERE clauses will return vendor names from A to C?

WHERE vendor_name < 'D'

To sort the rows that are retrieved by a SELECT statement in descending sequence by invoice_total, you code this ORDER BY clause:

ORDER BY invoice_total Answer DESC

When you code a SELECT statement, you must code the four main clauses in the following order

SELECT, FROM, WHERE, ORDER BY

If you want to filter the rows that are returned by a SELECT statement, you must include a/an ___ clause.

WHERE

Unless you assign a/an ___, the column name in the result set is the same as the column name in the base table.

alias

When you code an ORDER BY clause, you can specify a

column name, alias, expression, or column number

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?

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?

invoice_total IN (0, 1000)

To override the order of precedence in an arithmetic expression, you can use

parentheses

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?

payment_date IS NOT NULL AND invoice_total >= 500

Which of the following isn't a valid column alias?

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 REGEXP 'NA$'


Ensembles d'études connexes

Marketing Regulations (Purchase and Rental)

View Set

BUS LAW CH 12: Employment Discrimination

View Set

cellular respiration mastering bio

View Set

Adult Nursing - Chapter 13: Fluid and Electrolytes: Balance and Disturbance - PrepU

View Set