Chapter 3 Flashcards
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
False
T||F: The TOP built-in function in SQL is used to find the maximum value in a numeric column
False
T||F: In SQL, multiple conditions in the WHERE clause can be combined by using the SQL AND keyword
True
Standard SQL does not allow built-in functions to be used in a WHERE clause
True
Built-In SQL functions cannot be applied to data combined using the GROUP BY keyword
False
The order of the columns returned by an SQL SELECT statement is determined by the:
order they are listed in following SELECT
Which SQL keyword is used to eliminate duplicate in the results of an SQL SELECT query?
DISTINCT
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?
WHERE Hours BETWEEN 10 AND 50
Which symbol is used in standard SQL as a wildcard to represent a series of one or more unspecified characters?
A % sign
Explain why it is important to learn SQL
SQL is a standard language and are made instead of just using the interface
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
SELECT Name, PhoneNumber
FROM CUSTOMER
WHERE AccountBalance > 50;
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’
SELECT Name, PhoneNumber
FROM CUSTOMER
WHERE Name LIKE ‘S%’;