Chapter 3 Flashcards Preview

COM 330 > Chapter 3 > Flashcards

Flashcards in Chapter 3 Deck (12)
Loading 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

2
Q

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

A

False

3
Q

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

A

True

4
Q

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

A

True

5
Q

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

A

False

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

7
Q

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

A

DISTINCT

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

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

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

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;

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%’;