Deck 3: The Relational Model 2: SQL

Full screen (f)
exit full mode
Question
You can use the GROUP BY clause and the ORDER BY clause in the same SELECT statement.
Use Space or
up arrow
down arrow
to flip the card.
Question
The rules for naming tables and columns are the same in every version of SQL.
Question
Preceding a condition by the NOT operator reverses the truth or falsity of the original condition.
Question
In SQL,you use the SORT BY clause to display results in a desired order.
Question
The IN operator can be used instead or the OR operator in phrasing certain conditions.
Question
There are two versions of the "not equal to" operator: <> and !=.
Question
When a query involves a character field,such as CustomerName,you must enclose the value to which the field is being compared in percent symbols (%).
Question
Fields will appear in the query results in the order in which they are listed in the SELECT clause.
Question
The BETWEEN operator is an essential feature of SQL.
Question
When rows are grouped,one line of output is produced for each group.
Question
Instead of listing all the field names in the SELECT clause,you can use the * symbol.
Question
In SQL,you join tables by entering the appropriate conditions in the WHERE clause.
Question
In a SELECT statement,the WHERE clause is mandatory.
Question
Most relational DBMSs use a version of SQL as a data manipulation language.
Question
When you enter numbers in an SQL command,you do not type commas or dollar signs.
Question
CHAR data types are numbers without a decimal part.
Question
You can combine values in character fields as well as number fields.
Question
A WHERE and a HAVING clause cannot be included in the same query.
Question
To create numbers with decimals in Access,you can use the CURRENCY,NUMBER,or DECIMAL data types.
Question
The HAVING clause is to groups what the WHERE clause is to rows.
Question
To add new data to a table,use the ____ command.

A)ADDTO
B)DELETE
C)INSERT
D)SELECT
Question
In MySQL,the ____ is used as a wildcard to represent any collection of characters.

A)asterisk (*)
B)underscore (_)
C)percent sign (%)
D)question mark (?)
Question
To use a wildcard,include the ____ operator in the WHERE clause.

A)AS
B)UNION
C)BETWEEN
D)LIKE
Question
Based on the code above,list the number,name,credit limit,and balance for all customers with credit limits that exceed their balances.

A)SELECT CustomerNum,CustomerName,CreditLimit,Balance FROM Customer ;
B)SELECT CustomerNum,CustomerName,CreditLimit,Balance FROM Customer WHERE CreditLimit>Balance ;
C)SELECT CustomerNum,CustomerName,Balance FROM Customer WHERE CreditLimit>Balance ;
D)SELECT CustomerNum,CustomerName FROM Customer WHERE CreditLimit>Balance ;
Question
When used after the word SELECT,the ____ symbol indicates that you want to include all fields in the query results in the order in which you described them to the DBMS when you created the table.

A)&
B)*
C)$
D)#
Question
When you use a name containing a space in Access SQL,you must ____.

A)enclose it in square brackets
B)enclose it in quotation marks
C)precede it by an asterisk
D)precede it by a question mark
Question
In Access SQL,the ____ is used as a wildcard to represent any individual character.

A)asterisk (*)
B)underscore (_)
C)percent sign (%)
D)question mark (?)
Question
Based on the code above,list the number,name,street,and credit limit of all customers. Order the customers by name within descending credit limit.

A)SELECT CustomerNum,CustomerName,Street,CreditLimit FROM Customer SORT BY CreditLimit DESC,CustomerName ;
B)SELECT CustomerNum,CustomerName,Street,CreditLimit FROM Customer SORT BY CreditLimit ASC,CustomerName ;
C)SELECT CustomerNum,CustomerName,Street,CreditLimit FROM Customer ORDER BY CreditLimit DESC,CustomerName ;
D)SELECT CustomerNum,CustomerName,Street,CreditLimit FROM Customer ORDER BY CreditLimit ASC,CustomerName ;
Question
When rows are grouped,____.

A)the totals appear with the rows
B)the rows appear in order
C)no output is produced
D)one line of output is produced for each group
Question
You can save the results of a query as a table by including the ____ clause in the query.

A)INTO
B)INSERT
C)UPDATE
D)DELETE
Question
Based on the code above,list the number,name,and balance of all customers with balances greater than or equal to $1,000 and less than or equal to $5,000.

A)SELECT CustomerNum,CustomerName,Balance FROM Customer WHERE Balance BETWEEN 1000 AND 5000 ;
B)SELECT CustomerNum,CustomerName,Balance FROM Customer WHERE Balance > 1000 ;
C)SELECT CustomerName,Balance FROM Customer WHERE Balance BETWEEN 1000 AND 5000 ;
D)SELECT CustomerNum,CustomerName FROM Customer WHERE Balance BETWEEN 1000 AND 5000 ;
Question
Based on the code above,list the number,name,and complete address of every customer located on a street that contains the letters "Oxford".

A)SELECT CustomerNum,CustomerName,Street,City,State,Zip FROM Customer WHERE Street LIKE "?Oxford" ;
B)SELECT CustomerNum,CustomerName,Street,City,State,Zip FROM Customer WHERE Street LIKE "%Oxford%" ;
C)SELECT CustomerNum,CustomerName,Street,City,State,Zip FROM Customer WHERE Street LIKE "@Oxford@" ;
D)SELECT CustomerNum,CustomerName,Street,City,State,Zip FROM Customer WHERE Street LIKE "Oxford" ;
Question
The ____ function determines the largest value in a given column.

A)LGE
B)LARGE
C)MAX
D)MAXIMUM
Question
When a subquery is used,____ is(are) evaluated first.

A)the subquery query
B)the outer query
C)both a and b simultaneously
D)whichever query is selected to execute first by the user
Question
Based on the code above,list the number,name,and available credit for all customers with credit limits that exceed their balances.

A)SELECT CustomerNum,CustomerName AS AvailableCredit FROM Customer WHERE CreditLimit>Balance ;
B)SELECT CustomerNum,CustomerName,CreditLimit AS AvailableCredit FROM Customer WHERE CreditLimit>Balance ;
C)SELECT CustomerNum,CustomerName,Balance AS AvailableCredit FROM Customer WHERE CreditLimit>Balance ;
D)SELECT CustomerNum,CustomerName,CreditLimit-Balance AS AvailableCredit FROM Customer WHERE CreditLimit>Balance ;
Question
Based on the code above,for each sales rep,list the rep number,the number of customers assigned to the rep,and the average balance of the rep's customers. Group the records by rep number and order the records by rep number.

A)SELECT RepNum,AVG(Balance) FROM Customer GROUP BY RepNum ORDER BY RepNum ;
B)SELECT RepNum,COUNT(*),AVG(Balance) FROM Part GROUP BY RepNum ORDER BY RepNum ;
C)SELECT RepNum,COUNT(*),AVG(Balance) FROM Customer GROUP BY RepNum ORDER BY RepNum ;
D)SELECT RepNum,COUNT(*) FROM Customer GROUP BY RepNum ORDER BY RepNum ;
Question
Many versions of SQL require you to end a command with a ____.

A)comma (,)
B)period (.)
C)colon (:)
D)semicolon (;)
Question
In order to make changes to existing data in a table,you would use the ____ command.

A)DELETE
B)CHANGE
C)SELECT
D)UPDATE
Question
The basic form of an SQL retrieval command is ____.

A)SELECT-WHERE-FROM
B)CREATE-SELECT-FROM
C)SELECT-WHERE
D)SELECT-FROM-WHERE
Question
The ____ clause can be used to create groups of records.

A)SELECT
B)ORDER BY
C)SORT BY
D)GROUP BY
Question
In Access,you can combine values in character fields into a single computed field by using the ____________________ operator.
Question
A simple condition includes the field name,a(n) ____________________ operator,and either another field name or a value.
Question
Based on the code above,delete any row in the OrderLine table in which the part number is BV06.

A)DELETE FROM OrderLine WHERE PartNum='BV06' ;
B)DELETE FROM OrderLine WHERE PartNum=BV06 ;
C)DELETE FROM OrderLine WHERE PartNum='BV06'
D)DELETE FROM OrderLine WHERE PartNum='BV6' ;
Question
SQL was developed under the name ____________________ at the IBM San Jose research facilities.
Question
Use the ____________________ data type for fields that contain letters and other special characters,and for fields that contain numbers that will not be used for arithmetic.
Question
The ____________________ data type stores integers,but uses less space than INTEGER.
Question
Based on the code above,list the name of every student whose Zip code is 10113.

A)SELECT FirstName,LastName WHERE Zip='10113' ;
B)SELECT FirstName,LastName FROM Student WHERE Zip='10113' ;
C)SELECT FirstName,LastName FROM Student WHERE Zip='10113'
D)SELECT * FROM Student WHERE Zip='10113' ;
Question
Based on the code above,list the complete student table.

A)SELECT Student ;
B)SELECT & FROM Student ;
C)SELECT * FROM Student ;
D)SELECT LastName,FirstName,Street,City,State,Zip FROM Student
Question
Based on the code above,change the Zip code of the student with ID 11433 to 14455.

A)UPDATE Student SET Zip='14455' ;
B)UPDATE Student SET Zip WHERE StudentID='11433' ;
C)UPDATE Student IN Zip='14455' WHERE StudentID='11433' ;
D)UPDATE Student SET Zip='14455' WHERE StudentID='11433' ;
Question
Based on the code above,find how many parts are in item class HW.

A)SELECT SUM(*) FROM Part WHERE Class='HW' ;
B)SELECT COUNT(*) FROM Part WHERE Class='HW' ;
C)SELECT COUNT FROM Part WHERE Class='HW' ;
D)SELECT COUNT* FROM Part WHERE Class='HW' ;
Question
In MySQL,you use the ____________________ function to concatenate fields.
Question
By using the word ____________________ in a query after a computation,you can assign a name to the computed field.
Question
Based on the code above,list the descriptions of all parts that are not in Warehouse 3.

A)SELECT Description FROM Customer WHERE NOT Warehouse='3' ;
B)SELECT Description FROM Part WHERE Warehouse='4' ;
C)SELECT Description FROM Part WHERE Warehouse>'3' ;
D)SELECT Description FROM Part WHERE NOT Warehouse='3' ;
Question
As you are working in MySQL,the most recent command you entered is stored in a special area of memory called the ____________________.
Question
Based on the code above,find the name of the student whose ID is 1167.

A)SELECT FirstName,LastName FROM Course WHERE StudentID='1167' ;
B)SELECT FirstName,LastName FROM Part WHERE StudentID='1167' ;
C)SELECT FirstName,LastName FROM Student WHERE StudentID='1167' ;
D)SELECT FirstName,LastName FROM Customer WHERE StudentID='1167' ;
Question
Based on the code above,list the descriptions of all parts that are located in Warehouse 3 and for which there are more than 20 units on hand.

A)SELECT Description FROM Part WHERE Warehouse='3' AND OnHand>20 ;
B)SELECT Description FROM Part WHERE Warehouse='3' OR OnHand>20 ;
C)SELECT Description FROM Part WHERE Warehouse='3' ;
D)SELECT Description FROM Customer WHERE Warehouse='3' AND OnHand>20 ;
Question
When you connect simple conditions using the ____________________ operator,the compound condition will be true whenever any of the simple conditions are true.
Question
One common restriction placed on table and column names by DBMSs is that names can contain only letters,numbers,and ____________________.
Question
Based on the code above,list the descriptions of all parts that are located in Warehouse 3 or for which there are more than 20 units on hand,or both.

A)SELECT Description FROM Customer WHERE Warehouse='3' AND OnHand>20 ;
B)SELECT Description FROM Part WHERE Warehouse='3' OR OnHand>20 ;
C)SELECT Description FROM Part WHERE Warehouse='3' ;
D)SELECT Description FROM Part WHERE OnHand>20 ;
Question
You use the SQL ____________________ command to create a table by describing its layout.
Question
To qualify a field name,precede the name of the field with the name of the table,followed by a(n) ____________________.
Question
Describe how to construct a detailed query in a step-by-step fashion.
Question
When you need to sort data on two fields,the more important sort key is called the ____________________ sort key.
Question
The two tables involved in a union must have the same structure,or be ____________________.
Question
SQL has built-in functions,which are also called ____________________ functions.
Question
The ____________________ of two tables is a table containing all rows that are in either the first table,the second table,or both.
Question
In SQL,you sort data using the ____________________ clause.
Question
Discuss the restriction concerning the structure of two tables involved in a union.
Question
What are some common restrictions place on table and column names by DBMSs?
Question
When you place one query inside another,the inner query is called a(n)____________________.
Question
Many versions of SQL,including MySQL,use the ____________________ as a wildcard to represent any individual character.
Question
When you need to sort data on two fields,the less important key is called the ____________________ sort key.
Question
Describe five data types that you will often encounter when working with databases.
Question
How does the format for dates in queries in Access differ from other implementations of SQL?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/74
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 3: The Relational Model 2: SQL
1
You can use the GROUP BY clause and the ORDER BY clause in the same SELECT statement.
True
2
The rules for naming tables and columns are the same in every version of SQL.
False
3
Preceding a condition by the NOT operator reverses the truth or falsity of the original condition.
True
4
In SQL,you use the SORT BY clause to display results in a desired order.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
5
The IN operator can be used instead or the OR operator in phrasing certain conditions.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
6
There are two versions of the "not equal to" operator: <> and !=.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
7
When a query involves a character field,such as CustomerName,you must enclose the value to which the field is being compared in percent symbols (%).
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
8
Fields will appear in the query results in the order in which they are listed in the SELECT clause.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
9
The BETWEEN operator is an essential feature of SQL.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
10
When rows are grouped,one line of output is produced for each group.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
11
Instead of listing all the field names in the SELECT clause,you can use the * symbol.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
12
In SQL,you join tables by entering the appropriate conditions in the WHERE clause.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
13
In a SELECT statement,the WHERE clause is mandatory.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
14
Most relational DBMSs use a version of SQL as a data manipulation language.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
15
When you enter numbers in an SQL command,you do not type commas or dollar signs.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
16
CHAR data types are numbers without a decimal part.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
17
You can combine values in character fields as well as number fields.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
18
A WHERE and a HAVING clause cannot be included in the same query.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
19
To create numbers with decimals in Access,you can use the CURRENCY,NUMBER,or DECIMAL data types.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
20
The HAVING clause is to groups what the WHERE clause is to rows.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
21
To add new data to a table,use the ____ command.

A)ADDTO
B)DELETE
C)INSERT
D)SELECT
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
22
In MySQL,the ____ is used as a wildcard to represent any collection of characters.

A)asterisk (*)
B)underscore (_)
C)percent sign (%)
D)question mark (?)
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
23
To use a wildcard,include the ____ operator in the WHERE clause.

A)AS
B)UNION
C)BETWEEN
D)LIKE
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
24
Based on the code above,list the number,name,credit limit,and balance for all customers with credit limits that exceed their balances.

A)SELECT CustomerNum,CustomerName,CreditLimit,Balance FROM Customer ;
B)SELECT CustomerNum,CustomerName,CreditLimit,Balance FROM Customer WHERE CreditLimit>Balance ;
C)SELECT CustomerNum,CustomerName,Balance FROM Customer WHERE CreditLimit>Balance ;
D)SELECT CustomerNum,CustomerName FROM Customer WHERE CreditLimit>Balance ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
25
When used after the word SELECT,the ____ symbol indicates that you want to include all fields in the query results in the order in which you described them to the DBMS when you created the table.

A)&
B)*
C)$
D)#
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
26
When you use a name containing a space in Access SQL,you must ____.

A)enclose it in square brackets
B)enclose it in quotation marks
C)precede it by an asterisk
D)precede it by a question mark
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
27
In Access SQL,the ____ is used as a wildcard to represent any individual character.

A)asterisk (*)
B)underscore (_)
C)percent sign (%)
D)question mark (?)
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
28
Based on the code above,list the number,name,street,and credit limit of all customers. Order the customers by name within descending credit limit.

A)SELECT CustomerNum,CustomerName,Street,CreditLimit FROM Customer SORT BY CreditLimit DESC,CustomerName ;
B)SELECT CustomerNum,CustomerName,Street,CreditLimit FROM Customer SORT BY CreditLimit ASC,CustomerName ;
C)SELECT CustomerNum,CustomerName,Street,CreditLimit FROM Customer ORDER BY CreditLimit DESC,CustomerName ;
D)SELECT CustomerNum,CustomerName,Street,CreditLimit FROM Customer ORDER BY CreditLimit ASC,CustomerName ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
29
When rows are grouped,____.

A)the totals appear with the rows
B)the rows appear in order
C)no output is produced
D)one line of output is produced for each group
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
30
You can save the results of a query as a table by including the ____ clause in the query.

A)INTO
B)INSERT
C)UPDATE
D)DELETE
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
31
Based on the code above,list the number,name,and balance of all customers with balances greater than or equal to $1,000 and less than or equal to $5,000.

A)SELECT CustomerNum,CustomerName,Balance FROM Customer WHERE Balance BETWEEN 1000 AND 5000 ;
B)SELECT CustomerNum,CustomerName,Balance FROM Customer WHERE Balance > 1000 ;
C)SELECT CustomerName,Balance FROM Customer WHERE Balance BETWEEN 1000 AND 5000 ;
D)SELECT CustomerNum,CustomerName FROM Customer WHERE Balance BETWEEN 1000 AND 5000 ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
32
Based on the code above,list the number,name,and complete address of every customer located on a street that contains the letters "Oxford".

A)SELECT CustomerNum,CustomerName,Street,City,State,Zip FROM Customer WHERE Street LIKE "?Oxford" ;
B)SELECT CustomerNum,CustomerName,Street,City,State,Zip FROM Customer WHERE Street LIKE "%Oxford%" ;
C)SELECT CustomerNum,CustomerName,Street,City,State,Zip FROM Customer WHERE Street LIKE "@Oxford@" ;
D)SELECT CustomerNum,CustomerName,Street,City,State,Zip FROM Customer WHERE Street LIKE "Oxford" ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
33
The ____ function determines the largest value in a given column.

A)LGE
B)LARGE
C)MAX
D)MAXIMUM
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
34
When a subquery is used,____ is(are) evaluated first.

A)the subquery query
B)the outer query
C)both a and b simultaneously
D)whichever query is selected to execute first by the user
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
35
Based on the code above,list the number,name,and available credit for all customers with credit limits that exceed their balances.

A)SELECT CustomerNum,CustomerName AS AvailableCredit FROM Customer WHERE CreditLimit>Balance ;
B)SELECT CustomerNum,CustomerName,CreditLimit AS AvailableCredit FROM Customer WHERE CreditLimit>Balance ;
C)SELECT CustomerNum,CustomerName,Balance AS AvailableCredit FROM Customer WHERE CreditLimit>Balance ;
D)SELECT CustomerNum,CustomerName,CreditLimit-Balance AS AvailableCredit FROM Customer WHERE CreditLimit>Balance ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
36
Based on the code above,for each sales rep,list the rep number,the number of customers assigned to the rep,and the average balance of the rep's customers. Group the records by rep number and order the records by rep number.

A)SELECT RepNum,AVG(Balance) FROM Customer GROUP BY RepNum ORDER BY RepNum ;
B)SELECT RepNum,COUNT(*),AVG(Balance) FROM Part GROUP BY RepNum ORDER BY RepNum ;
C)SELECT RepNum,COUNT(*),AVG(Balance) FROM Customer GROUP BY RepNum ORDER BY RepNum ;
D)SELECT RepNum,COUNT(*) FROM Customer GROUP BY RepNum ORDER BY RepNum ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
37
Many versions of SQL require you to end a command with a ____.

A)comma (,)
B)period (.)
C)colon (:)
D)semicolon (;)
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
38
In order to make changes to existing data in a table,you would use the ____ command.

A)DELETE
B)CHANGE
C)SELECT
D)UPDATE
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
39
The basic form of an SQL retrieval command is ____.

A)SELECT-WHERE-FROM
B)CREATE-SELECT-FROM
C)SELECT-WHERE
D)SELECT-FROM-WHERE
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
40
The ____ clause can be used to create groups of records.

A)SELECT
B)ORDER BY
C)SORT BY
D)GROUP BY
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
41
In Access,you can combine values in character fields into a single computed field by using the ____________________ operator.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
42
A simple condition includes the field name,a(n) ____________________ operator,and either another field name or a value.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
43
Based on the code above,delete any row in the OrderLine table in which the part number is BV06.

A)DELETE FROM OrderLine WHERE PartNum='BV06' ;
B)DELETE FROM OrderLine WHERE PartNum=BV06 ;
C)DELETE FROM OrderLine WHERE PartNum='BV06'
D)DELETE FROM OrderLine WHERE PartNum='BV6' ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
44
SQL was developed under the name ____________________ at the IBM San Jose research facilities.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
45
Use the ____________________ data type for fields that contain letters and other special characters,and for fields that contain numbers that will not be used for arithmetic.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
46
The ____________________ data type stores integers,but uses less space than INTEGER.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
47
Based on the code above,list the name of every student whose Zip code is 10113.

A)SELECT FirstName,LastName WHERE Zip='10113' ;
B)SELECT FirstName,LastName FROM Student WHERE Zip='10113' ;
C)SELECT FirstName,LastName FROM Student WHERE Zip='10113'
D)SELECT * FROM Student WHERE Zip='10113' ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
48
Based on the code above,list the complete student table.

A)SELECT Student ;
B)SELECT & FROM Student ;
C)SELECT * FROM Student ;
D)SELECT LastName,FirstName,Street,City,State,Zip FROM Student
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
49
Based on the code above,change the Zip code of the student with ID 11433 to 14455.

A)UPDATE Student SET Zip='14455' ;
B)UPDATE Student SET Zip WHERE StudentID='11433' ;
C)UPDATE Student IN Zip='14455' WHERE StudentID='11433' ;
D)UPDATE Student SET Zip='14455' WHERE StudentID='11433' ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
50
Based on the code above,find how many parts are in item class HW.

A)SELECT SUM(*) FROM Part WHERE Class='HW' ;
B)SELECT COUNT(*) FROM Part WHERE Class='HW' ;
C)SELECT COUNT FROM Part WHERE Class='HW' ;
D)SELECT COUNT* FROM Part WHERE Class='HW' ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
51
In MySQL,you use the ____________________ function to concatenate fields.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
52
By using the word ____________________ in a query after a computation,you can assign a name to the computed field.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
53
Based on the code above,list the descriptions of all parts that are not in Warehouse 3.

A)SELECT Description FROM Customer WHERE NOT Warehouse='3' ;
B)SELECT Description FROM Part WHERE Warehouse='4' ;
C)SELECT Description FROM Part WHERE Warehouse>'3' ;
D)SELECT Description FROM Part WHERE NOT Warehouse='3' ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
54
As you are working in MySQL,the most recent command you entered is stored in a special area of memory called the ____________________.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
55
Based on the code above,find the name of the student whose ID is 1167.

A)SELECT FirstName,LastName FROM Course WHERE StudentID='1167' ;
B)SELECT FirstName,LastName FROM Part WHERE StudentID='1167' ;
C)SELECT FirstName,LastName FROM Student WHERE StudentID='1167' ;
D)SELECT FirstName,LastName FROM Customer WHERE StudentID='1167' ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
56
Based on the code above,list the descriptions of all parts that are located in Warehouse 3 and for which there are more than 20 units on hand.

A)SELECT Description FROM Part WHERE Warehouse='3' AND OnHand>20 ;
B)SELECT Description FROM Part WHERE Warehouse='3' OR OnHand>20 ;
C)SELECT Description FROM Part WHERE Warehouse='3' ;
D)SELECT Description FROM Customer WHERE Warehouse='3' AND OnHand>20 ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
57
When you connect simple conditions using the ____________________ operator,the compound condition will be true whenever any of the simple conditions are true.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
58
One common restriction placed on table and column names by DBMSs is that names can contain only letters,numbers,and ____________________.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
59
Based on the code above,list the descriptions of all parts that are located in Warehouse 3 or for which there are more than 20 units on hand,or both.

A)SELECT Description FROM Customer WHERE Warehouse='3' AND OnHand>20 ;
B)SELECT Description FROM Part WHERE Warehouse='3' OR OnHand>20 ;
C)SELECT Description FROM Part WHERE Warehouse='3' ;
D)SELECT Description FROM Part WHERE OnHand>20 ;
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
60
You use the SQL ____________________ command to create a table by describing its layout.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
61
To qualify a field name,precede the name of the field with the name of the table,followed by a(n) ____________________.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
62
Describe how to construct a detailed query in a step-by-step fashion.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
63
When you need to sort data on two fields,the more important sort key is called the ____________________ sort key.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
64
The two tables involved in a union must have the same structure,or be ____________________.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
65
SQL has built-in functions,which are also called ____________________ functions.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
66
The ____________________ of two tables is a table containing all rows that are in either the first table,the second table,or both.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
67
In SQL,you sort data using the ____________________ clause.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
68
Discuss the restriction concerning the structure of two tables involved in a union.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
69
What are some common restrictions place on table and column names by DBMSs?
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
70
When you place one query inside another,the inner query is called a(n)____________________.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
71
Many versions of SQL,including MySQL,use the ____________________ as a wildcard to represent any individual character.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
72
When you need to sort data on two fields,the less important key is called the ____________________ sort key.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
73
Describe five data types that you will often encounter when working with databases.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
74
How does the format for dates in queries in Access differ from other implementations of SQL?
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 74 flashcards in this deck.