Chapter 3 Flashcards

1
Q

T||F: When using SQL to create a table, a column is defined by declaring in this order: data type, column name, and optional constraints

A

False

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

T||F: The TOP built-in function in SQL is used to find the maximum value in a numeric column

A

False

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

T||F: In SQL, multiple conditions in the WHERE clause can be combined by using the SQL AND keyword

A

True

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

Standard SQL does not allow built-in functions to be used in a WHERE clause

A

True

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

Built-In SQL functions cannot be applied to data combined using the GROUP BY keyword

A

False

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

The order of the columns returned by an SQL SELECT statement is determined by the:

A

order they are listed in following SELECT

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

Which SQL keyword is used to eliminate duplicate in the results of an SQL SELECT query?

A

DISTINCT

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

Which of the following is the correct SQL clause to restrict the results of a SELECT query to only records that have a value in the range of 10 to 50 in the Hours column?

A

WHERE Hours BETWEEN 10 AND 50

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

Which symbol is used in standard SQL as a wildcard to represent a series of one or more unspecified characters?

A

A % sign

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

Explain why it is important to learn SQL

A

SQL is a standard language and are made instead of just using the interface

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

Given the table
CUSTOMER (CustID, Name, PhoneNumber, AccountBalance) write the standard SQL query to retrieve the Name and Phone Number of customers with a balance greater than 50

A

SELECT Name, PhoneNumber
FROM CUSTOMER
WHERE AccountBalance > 50;

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

Given the table
CUSTOMER (CustID, Name, PhoneNumber, AccountBalance) write the standard SQL query to retrieve the Name and Phone Number of customers whose name begins with ‘S’

A

SELECT Name, PhoneNumber
FROM CUSTOMER
WHERE Name LIKE ‘S%’;

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