Deck 7: Introduction to Structured Query Language Sql
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/75
Play
Full screen (f)
Deck 7: Introduction to Structured Query Language Sql
1
You can select partial table contents by naming the desired fields and by placing restrictions on the rows to be included in the output.
True
2
Some RDBMSs, such as Microsoft Access, automatically make the necessary conversions to eliminate case sensitivity.
True
3
The COMMIT command does not permanently save all changes. In order to do that, you must use SAVE.
False
4
All SQL commands must be issued on a single line.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
5
Date procedures are often more software-specific than other SQL procedures.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
6
Most SQL implementations yield case-insensitive searches.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
7
Numeric functions take one numeric parameter and return one value.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
8
SQL allows the use of logical restrictions on its inquiries such as OR, AND, and NOT.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
9
Comparison operators cannot be used to place restrictions on character-based attributes.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
10
An alias cannot be used when a table is required to be joined to itself in a recursive query.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
11
The COUNT function is designed to tally the number of non-null "values" of an attribute, and is often used in conjunction with the DISTINCT clause.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
12
You cannot insert a row containing a null attribute value using SQL.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
13
Oracle users can use the Access QBE (query by example) query generator.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
14
The conditional LIKE must be used in conjunction with wildcard characters.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
15
String comparisons are made from left to right.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
16
The ANSI SQL standards are also accepted by the ISO.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
17
A database language enables the user to perform complex queries designed to transform the raw data into useful information.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
18
ANSI-standard SQL allows the use of special operators in conjunction with the WHERE clause.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
19
Although SQL commands can be grouped together on a single line, complex command sequences are best shown on separate lines, with space between the SQL command and the command's components.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
20
SQL is considered difficult to learn; its command set has a vocabulary of more than 300 words.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
21
A(n) _____ join performs a relational product (also known as the Cartesian product) of two tables.
A) full
B) cross
C) natural
D) equi-
A) full
B) cross
C) natural
D) equi-
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
22
The special operator used to check whether an attribute value is within a range of values is _____.
A) BETWEEN
B) NULL
C) LIKE
D) IN
A) BETWEEN
B) NULL
C) LIKE
D) IN
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
23
Which comparison operator indicates a value isnot equal?
A) <
B) <=
C) >=
D) <>
A) <
B) <=
C) >=
D) <>
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
24
What type of command does this SQL statement use? 
A) set operator
B) natural join
C) "old-style" join
D) procedural statement

A) set operator
B) natural join
C) "old-style" join
D) procedural statement
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
25
The SQL data manipulation command HAVING:
A) restricts the selection of rows based on a conditional expression.
B) restricts the selection of grouped rows based on a condition.
C) modifies an attribute's values in one or more table's rows.
D) groups the selected rows based on one or more attributes.
A) restricts the selection of rows based on a conditional expression.
B) restricts the selection of grouped rows based on a condition.
C) modifies an attribute's values in one or more table's rows.
D) groups the selected rows based on one or more attributes.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
26
The _____ command defines a default value for a column when no value is given.
A) CHECK
B) UNIQUE
C) NOT NULL
D) DEFAULT
A) CHECK
B) UNIQUE
C) NOT NULL
D) DEFAULT
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
27
A(n) _____ join returns not only the rows matching the join condition (that is, rows with matching values in the common columns) but also the rows with unmatched values.
A) outer
B) inner
C) equi-
D) cross
A) outer
B) inner
C) equi-
D) cross
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
28
Which query is used to list a unique value for V_CODE, where the list will produce only a list of those values that are different from one another?
A) SELECT ONLY V_CODE
FROM PRODUCT;
B) SELECT UNIQUE V_CODE
FROM PRODUCT;
C) SELECT DIFFERENT V_CODE
FROM PRODUCT;
D) SELECT DISTINCT V_CODE
FROM PRODUCT;
A) SELECT ONLY V_CODE
FROM PRODUCT;
B) SELECT UNIQUE V_CODE
FROM PRODUCT;
C) SELECT DIFFERENT V_CODE
FROM PRODUCT;
D) SELECT DISTINCT V_CODE
FROM PRODUCT;
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
29
A(n) _____ join will select only the rows with matching values in the common attribute(s).
A) natural
B) outer
C) full
D) cross
A) natural
B) outer
C) full
D) cross
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
30
How many rows would be returned from a cross join of tables A and B, if A contains 8 rows and B contains 18?
A) 8
B) 18
C) 26
D) 144
A) 8
B) 18
C) 26
D) 144
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
31
When using a(n) _____ join, only rows from the tables that match on a common value are returned.
A) full
B) outer
C) inner
D) set
A) full
B) outer
C) inner
D) set
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
32
A(n) _____ query specifies which data should be retrieved and how it should be filtered, aggregated, and displayed.
A) INSERT
B) SELECT
C) COMMIT
D) UPDATE
A) INSERT
B) SELECT
C) COMMIT
D) UPDATE
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
33
The special operator used to check whether an attribute value matches a given string pattern is _____.
A) BETWEEN
B) IS NULL
C) LIKE
D) IN
A) BETWEEN
B) IS NULL
C) LIKE
D) IN
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
34
If a designer wishes to create an inner join, but the two tables do not have a commonly named attribute, he can use a(n) _____ clause.
A) OF
B) USING
C) HAS
D) JOIN ON
A) OF
B) USING
C) HAS
D) JOIN ON
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
35
The syntax for a left outer join is _____.
A) SELECT column-list
FROM table1 OUTER JOIN table2 LEFT
WHERE join-condition
B) SELECT column-list
FROM table1 LEFT [OUTER] JOIN table2
ON join-condition
C) SELECT column-list
WHERE LEFT table1 = table
D) SELECT column-list
FROM table1 LEFT table2 [JOIN]
WHERE join-condition
A) SELECT column-list
FROM table1 OUTER JOIN table2 LEFT
WHERE join-condition
B) SELECT column-list
FROM table1 LEFT [OUTER] JOIN table2
ON join-condition
C) SELECT column-list
WHERE LEFT table1 = table
D) SELECT column-list
FROM table1 LEFT table2 [JOIN]
WHERE join-condition
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
36
The SQL command that allows a user to permanently save data changes is _____.
A) INSERT
B) SELECT
C) COMMIT
D) UPDATE
A) INSERT
B) SELECT
C) COMMIT
D) UPDATE
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
37
The SQL aggregate function that gives the number of rows containing non-null values for a given column is _____.
A) COUNT
B) MIN
C) MAX
D) SUM
A) COUNT
B) MIN
C) MAX
D) SUM
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
38
According to the rules of precedence, which of the following computations should be completed first?
A) Additions and subtractions
B) Multiplications and divisions
C) Operations within parentheses
D) Power operations
A) Additions and subtractions
B) Multiplications and divisions
C) Operations within parentheses
D) Power operations
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
39
The _____ command restricts the selection of grouped rows based on a condition.
A) DISPLAY
B) HAVING
C) FROM
D) CONVERT
A) DISPLAY
B) HAVING
C) FROM
D) CONVERT
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
40
A(n) _____ is an alternate name given to a column or table in any SQL statement.
A) alias
B) data type
C) stored function
D) trigger
A) alias
B) data type
C) stored function
D) trigger
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
41
A(n) _____ order sequence is a multilevel ordered sequence that can be created easily by listing several attributes, separated by commas, after the ORDER BY clause.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
42
The Oracle _____ function compares an attribute or expression with a series of values and returns an associated value or a default value if no match is found.
A) NVL
B) TO_CHAR
C) DECODE
D) CONVERT
A) NVL
B) TO_CHAR
C) DECODE
D) CONVERT
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
43
When using the Oracle TO_DATE function, the code _____ represents a three-letter month name.
A) MON
B) MM3
C) MONTH
D) MM
A) MON
B) MM3
C) MONTH
D) MM
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
44
A(n) _____ character is a symbol that can be used as a general substitute for other characters or commands.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
45
An alias is especially useful when a table must be joined to itself in a(n) _____ query.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
46
In Oracle, the _____ function converts a date to a character string.
A) CONVERT()
B) TO_DATE
C) TO_CHAR()
D) TO_STRING()
A) CONVERT()
B) TO_DATE
C) TO_CHAR()
D) TO_STRING()
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
47
_____ is a relational set operator.
A) EXCEPT
B) PLUS
C) ALL
D) EXISTS
A) EXCEPT
B) PLUS
C) ALL
D) EXISTS
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
48
_____ is a string function that returns the number of characters in a string value.
A) LENGTH
B) SUBSTRING
C) CONCAT
D) UCASE
A) LENGTH
B) SUBSTRING
C) CONCAT
D) UCASE
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
49
A(n) _____ is a query that is embedded (or nested) inside another query.
A) alias
B) operator
C) subquery
D) view
A) alias
B) operator
C) subquery
D) view
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
50
The _____ function returns the current system date in MS Access.
A) TO_DATE()
B) SYSDATE()
C) DATE()
D) TODAY()
A) TO_DATE()
B) SYSDATE()
C) DATE()
D) TODAY()
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
51
Which is a feature of a correlated subquery?
A) The inner subquery executes first.
B) The outer subquery initiates the process of execution in a subquery.
C) The inner subquery initiates the process of execution in a subquery.
D) The outer subquery executes independent of the inner subquery.
A) The inner subquery executes first.
B) The outer subquery initiates the process of execution in a subquery.
C) The inner subquery initiates the process of execution in a subquery.
D) The outer subquery executes independent of the inner subquery.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
52
In the SQL environment, the word _____ covers both questions and actions.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
53
The _____ specification is used to avoid having duplicated values in a column.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
54
A specialty field in mathematics, known as _____ algebra, is dedicated to the use of logical operators.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
55
In SQL, all _____ expressions evaluate to true or false.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
56
The _____ command, coupled with appropriate search conditions, is an incredibly powerful tool that enables a user to transform data into information.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
57
The _____ condition is generally composed of an equality comparison between the foreign key and the primary key of related tables.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
58
The special operator used to check whether a subquery returns any rows is _____.
A) BETWEEN
B) EXISTS
C) LIKE
D) IN
A) BETWEEN
B) EXISTS
C) LIKE
D) IN
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
59
In subquery terminology, the first query in the SQL statement is known as the _____ query.
A) outer
B) left
C) inner
D) base
A) outer
B) left
C) inner
D) base
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
60
The basic SQL vocabulary has fewer than _____words.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
61
What is a subquery? What is always executed first?
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
62
The _____statement in SQL combines rows from two queries and returns only the rows that appear in the first set but not in the second.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
63
_____ functions allow you to take a value of a given data type and convert it to the equivalent value in another data type.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
64
The _____ operator could be used in place of INTERSECT if the DBMS does not support it.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
65
"_____" means that the names of the relation attributes must be the same and their data types must be alike.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
66
The syntax of theEXCEPT statement in Oracle is _____.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
67
What are the wildcard characters that are used with the LIKE command? Provide one or more examples of each.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
68
A(n) _____, also known as a nested query or an inner query, is a query that is embedded (or nested) inside another query.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
69
Describe the important features and applications of SQL functions.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
70
The _____ clause of the GROUP BY statement operates very much like the WHERE clause in the SELECT statement.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
71
Rows can be grouped into smaller collections quickly and easily using the _____ clause within the SELECT statement.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
72
The _____ operator could be used in place of EXCEPT (MINUS) if the DBMS does not support it.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
73
DATE() and SYSDATE are special functions that return today's date in MS Access and _____, respectively.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
74
Explain the SQL function categories.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
75
What are the four different types of results that can be returned from a subquery?
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck