Chapter 3 Flashcards

1
Q

Which clause allows you to sort column data in ascending or descending order?

a. ORDER BY
b. FROM
c. WHERE
d. BETWEEN

A

a. ORDER BY

The ORDER BY clause retrieves the name of one or more columns from the SELECT statement and then sorts (ascending or descending) the output.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which operator, when used with the WHERE clause, lets you match any condition opposite of the one defined?

a. BETWEEN
b. IN
c. NOT
d. AND

A

c. NOT

NOT is a logical operator used to match any condition opposite of the one defined.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What operator is used to perform wildcard-character filtering?

a. AND
b. SELECT
c. IS NULL
d. LIKE

A

d. LIKE

Like is used to filter data that fits a pattern

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why wont the following SQL statement work?

SELECT*
FROM CHECKS
ORDER BY Desc;

a. The order by clause doesn’t specify any column names.
b. The query is missing a WHERE clause.
c. There are no column names specified after SELECT
keyword.
d. The desc keyword should be capitalized.

A

a. The ORDER BY clause doesn’t specify any column names.

The ORDER BY clause must be used with at least one column name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which of the following is (are) used to specify a set of characters?

a. Semicolon
b. Select
c. Brackets
d. Colon

A

c. Brackets

Specified characters are placed within brackets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly