Deck 2: Introduction to Structured Query Language

Full screen (f)
exit full mode
Question
SQL is only a data manipulation language (DML).
Use Space or
up arrow
down arrow
to flip the card.
Question
The American National Standards Institute (ANSI)maintains the standards for SQL.
Question
SQL statements end with a colon.
Question
The columns to be obtained by an SQL command are listed after the FROM keyword.
Question
The SQL WHERE clause contains the condition that specifies which rows are to be selected.
Question
To obtain all columns,use an asterisk (*)wildcard character instead of listing all the column names.
Question
An ad-hoc SQL query is typically written within an application program.
Question
SQL can only query a single table.
Question
SQL commands can be embedded in application programs.
Question
The SQL keyword WHERE is used to specify the table(s)that contain(s)the data to be retrieved.
Question
SQL stands for Standard Query Language.
Question
To remove duplicate rows from the result of a query,specify the SQL DISTINCT keyword.
Question
SQL includes a data definition language,a data manipulation language,and SQL/Persistent stored modules.
Question
The SQL keyword SELECT is used to specify the columns to be listed in the query results.
Question
In addition to being a data sublanguage,SQL is also a programming language,like Java or C#.
Question
Business Intelligence (BI)systems typically store their data in data warehouses.
Question
SQL,although very popular,has never become a national standard.
Question
SQL was developed by IBM in the late 1970s.
Question
SQL is not a complete programming language.Rather it is a data sublanguage.
Question
The SQL keyword FROM is used to specify the table to be used.
Question
When two conditions must both be true for the rows to be selected,the conditions are separated by the SQL AND keyword.
Question
The Microsoft Access wildcard character "*" (asterisk)indicates a sequence of one or more unspecified characters in a Microsoft Access SQL query.
Question
Sorting is specified by the use of the SORT BY phrase.
Question
An asterisk (*)following the SELECT verb means that all columns are to be displayed.
Question
The result of an SQL SELECT operation can contain duplicate rows.
Question
The WHERE clause contains the condition that specifies which columns are to be selected.
Question
The SQL wildcard character "%" represents a series of one or more unspecified characters.
Question
To exclude one or more values using a condition,the SQL OUT keyword must be used.
Question
The rows of the result table can be sorted by the values in one or more columns.
Question
The SQL wildcard character "#" indicates a single,unspecified character in a specific location in an SQL query.
Question
To refer to a set of values in a condition,the values are placed inside parentheses ( )and separated by commas.
Question
Columns can be sorted in descending sequence by using the SQL DESC keyword.
Question
The Microsoft Access wildcard character "_" (underscore)indicates a single,unspecified character in a specific location in a Microsoft Access SQL query.
Question
A WHERE clause can contain only one condition.
Question
The SQL built-in function ADDUP totals values in numeric columns.
Question
To sort the rows of the result table,the ORDER BY clause is specified.
Question
To have SQL automatically eliminate duplicate rows from a result,use the keyword DISTINCT with the FROM keyword.
Question
To refer to a set of values needed for a condition,use the SQL IN operator.
Question
The SQL keyword LIKE is used in SQL expressions to select partial string values.
Question
The condition in WHERE clauses can refer to a set of values by using the IN operator.
Question
In an SQL query,a join operation is achieved by specifying the equality of the respective column names as a condition in the WHERE clause.
Question
An alternative to combining tables by a subquery is to use a join.
Question
A WHERE clause can contain another SELECT statement enclosed in parentheses.
Question
The SQL built-in function MOST obtains the largest value in a numeric column.
Question
The SQL syntax JOIN ...ON can be used as an alternate way of writing an SQL join statement.
Question
The SQL built-in function COUNT computes the number of rows in a query.
Question
A nested SELECT statement (one that appears within the WHERE clause of another SQL statement)is called a subquery and must be enclosed in parentheses.
Question
The built-in function SUM can be used with any column.
Question
The names of tables to be joined in an SQL query are listed in the FROM clause.
Question
Arithmetic in SQL statements is limited to the operations provided by the built-in functions.
Question
The SQL built-in function AVG computes the average of values in numeric columns.
Question
A SELECT statement used in a WHERE clause is called a subquery.
Question
Only two tables can be queried by using a subquery.
Question
Two or more tables are joined by giving the table names in the WHERE clause and specifying the equality of the respective column names as a condition in the GROUP BY clause.
Question
When people use the term join they normally mean an equijoin.
Question
The clause SELECT COUNT (*)results in a table with a single row and a single column.
Question
The SQL keyword GROUP BY instructs the DBMS to group together those rows that have the same value in a column.
Question
While many subqueries can be alternatively written as joins,correlated subqueries do work that cannot be duplicated as a join.
Question
Every subquery can be alternatively expressed by a join.
Question
The SQL built-in function MIN obtains the smallest value in a numeric column.
Question
In an SQL query,which SQL keyword is used to determine if a column value is equal to any one of a set of values?

A)AND
B)EXISTS
C)OR
D)IN
Question
Joins that show only matching rows from the joined tables in their results are called inner joins.
Question
A database extracted from the operational database for BI purposes typically ________.

A)is an exact copy of the operational database
B)contains only the metadata from the operational database
C)combines all the data from the operational database into one large table
D)contains just part of the operational database
Question
An ad-hoc query is ________.

A)a question about the data that requires a program to be written
B)a question that can be answered from the database using SQL
C)a question that can be answered only by combining several SQL queries
D)never useful in Business Intelligence scenarios
Question
In an SQL query,which SQL keyword is used to state the condition that specifies which rows are to be selected?

A)SET
B)FROM
C)SELECT
D)WHERE
Question
The INTERSECT of two relations A and B consists of all rows that are in relation B but are not in relation A.
Question
The UNION of two relations A and B consists of all rows that are either in relation A or in relation B or both.
Question
In an SQL query,which of the following symbols is used by ANSI SQL to represent all the columns in a single table?

A)_ (underscore)
B)? (question mark)
C)* (asterisk)
D)% (percent)
Question
Outer joins can be either up joins or down joins.
Question
SQL is a ________.

A)data sublanguage
B)data manipulation language
C)data definition language
D)programming language
Question
Given a table with the structure: EMPLOYEE (EmpNo,Name,Salary,HireDate),which of the following would find all employees whose name begins with the letter "S" using standard SQL?

A)SELECT *
FROM EMPLOYEE
WHERE Name IN ['S'];
B)SELECT EmpNo
FROM EMPLOYEE
WHERE Name LIKE 'S';
C)SELECT *
FROM Name
WHERE EMPLOYEE LIKE 'S*';
D)SELECT *
FROM EMPLOYEE
WHERE Name LIKE 'S%';
Question
In an SQL query,which of the following symbols is used by ANSI SQL to represent a single unspecified character?

A)_ (underscore)
B)? (question mark)
C)* (asterisk)
D)% (percent)
Question
Joins that show the matching rows from the joined tables plus unmatched rows from one other table in their results are called outer joins.
Question
In an SQL query,which SQL keyword must be used to remove duplicate rows from the result table?

A)DELETE
B)DISTINCT
C)UNIQUE
D)KEY
Question
In an SQL query,which SQL keyword actually begins the query?

A)EXISTS
B)FROM
C)SELECT
D)WHERE
Question
When making an SQL query,we are using SQL as a(n)________.

A)DDL
B)DML
C)embedded language
D)SET
Question
In an SQL query,which SQL keyword is used to specify the table(s)to be used?

A)EXISTS
B)FROM
C)SELECT
D)WHERE
Question
In an SQL query,which of the following symbols is used by Microsoft Access to represent a single unspecified character?

A)_ (underscore)
B)? (question mark)
C)* (asterisk)
D)% (percent)
Question
In an SQL query,which SQL keyword is used to sort the result table by the values in one or more columns?

A)GROUP BY
B)ORDER BY
C)SELECT
D)SORT BY
Question
In an SQL query,which SQL keyword is used to link two conditions that both must be true for the rows to be selected?

A)AND
B)EXISTS
C)OR
D)IN
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/114
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 2: Introduction to Structured Query Language
1
SQL is only a data manipulation language (DML).
False
2
The American National Standards Institute (ANSI)maintains the standards for SQL.
True
3
SQL statements end with a colon.
False
4
The columns to be obtained by an SQL command are listed after the FROM keyword.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
5
The SQL WHERE clause contains the condition that specifies which rows are to be selected.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
6
To obtain all columns,use an asterisk (*)wildcard character instead of listing all the column names.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
7
An ad-hoc SQL query is typically written within an application program.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
8
SQL can only query a single table.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
9
SQL commands can be embedded in application programs.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
10
The SQL keyword WHERE is used to specify the table(s)that contain(s)the data to be retrieved.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
11
SQL stands for Standard Query Language.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
12
To remove duplicate rows from the result of a query,specify the SQL DISTINCT keyword.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
13
SQL includes a data definition language,a data manipulation language,and SQL/Persistent stored modules.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
14
The SQL keyword SELECT is used to specify the columns to be listed in the query results.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
15
In addition to being a data sublanguage,SQL is also a programming language,like Java or C#.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
16
Business Intelligence (BI)systems typically store their data in data warehouses.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
17
SQL,although very popular,has never become a national standard.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
18
SQL was developed by IBM in the late 1970s.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
19
SQL is not a complete programming language.Rather it is a data sublanguage.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
20
The SQL keyword FROM is used to specify the table to be used.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
21
When two conditions must both be true for the rows to be selected,the conditions are separated by the SQL AND keyword.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
22
The Microsoft Access wildcard character "*" (asterisk)indicates a sequence of one or more unspecified characters in a Microsoft Access SQL query.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
23
Sorting is specified by the use of the SORT BY phrase.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
24
An asterisk (*)following the SELECT verb means that all columns are to be displayed.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
25
The result of an SQL SELECT operation can contain duplicate rows.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
26
The WHERE clause contains the condition that specifies which columns are to be selected.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
27
The SQL wildcard character "%" represents a series of one or more unspecified characters.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
28
To exclude one or more values using a condition,the SQL OUT keyword must be used.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
29
The rows of the result table can be sorted by the values in one or more columns.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
30
The SQL wildcard character "#" indicates a single,unspecified character in a specific location in an SQL query.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
31
To refer to a set of values in a condition,the values are placed inside parentheses ( )and separated by commas.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
32
Columns can be sorted in descending sequence by using the SQL DESC keyword.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
33
The Microsoft Access wildcard character "_" (underscore)indicates a single,unspecified character in a specific location in a Microsoft Access SQL query.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
34
A WHERE clause can contain only one condition.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
35
The SQL built-in function ADDUP totals values in numeric columns.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
36
To sort the rows of the result table,the ORDER BY clause is specified.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
37
To have SQL automatically eliminate duplicate rows from a result,use the keyword DISTINCT with the FROM keyword.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
38
To refer to a set of values needed for a condition,use the SQL IN operator.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
39
The SQL keyword LIKE is used in SQL expressions to select partial string values.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
40
The condition in WHERE clauses can refer to a set of values by using the IN operator.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
41
In an SQL query,a join operation is achieved by specifying the equality of the respective column names as a condition in the WHERE clause.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
42
An alternative to combining tables by a subquery is to use a join.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
43
A WHERE clause can contain another SELECT statement enclosed in parentheses.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
44
The SQL built-in function MOST obtains the largest value in a numeric column.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
45
The SQL syntax JOIN ...ON can be used as an alternate way of writing an SQL join statement.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
46
The SQL built-in function COUNT computes the number of rows in a query.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
47
A nested SELECT statement (one that appears within the WHERE clause of another SQL statement)is called a subquery and must be enclosed in parentheses.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
48
The built-in function SUM can be used with any column.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
49
The names of tables to be joined in an SQL query are listed in the FROM clause.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
50
Arithmetic in SQL statements is limited to the operations provided by the built-in functions.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
51
The SQL built-in function AVG computes the average of values in numeric columns.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
52
A SELECT statement used in a WHERE clause is called a subquery.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
53
Only two tables can be queried by using a subquery.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
54
Two or more tables are joined by giving the table names in the WHERE clause and specifying the equality of the respective column names as a condition in the GROUP BY clause.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
55
When people use the term join they normally mean an equijoin.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
56
The clause SELECT COUNT (*)results in a table with a single row and a single column.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
57
The SQL keyword GROUP BY instructs the DBMS to group together those rows that have the same value in a column.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
58
While many subqueries can be alternatively written as joins,correlated subqueries do work that cannot be duplicated as a join.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
59
Every subquery can be alternatively expressed by a join.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
60
The SQL built-in function MIN obtains the smallest value in a numeric column.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
61
In an SQL query,which SQL keyword is used to determine if a column value is equal to any one of a set of values?

A)AND
B)EXISTS
C)OR
D)IN
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
62
Joins that show only matching rows from the joined tables in their results are called inner joins.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
63
A database extracted from the operational database for BI purposes typically ________.

A)is an exact copy of the operational database
B)contains only the metadata from the operational database
C)combines all the data from the operational database into one large table
D)contains just part of the operational database
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
64
An ad-hoc query is ________.

A)a question about the data that requires a program to be written
B)a question that can be answered from the database using SQL
C)a question that can be answered only by combining several SQL queries
D)never useful in Business Intelligence scenarios
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
65
In an SQL query,which SQL keyword is used to state the condition that specifies which rows are to be selected?

A)SET
B)FROM
C)SELECT
D)WHERE
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
66
The INTERSECT of two relations A and B consists of all rows that are in relation B but are not in relation A.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
67
The UNION of two relations A and B consists of all rows that are either in relation A or in relation B or both.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
68
In an SQL query,which of the following symbols is used by ANSI SQL to represent all the columns in a single table?

A)_ (underscore)
B)? (question mark)
C)* (asterisk)
D)% (percent)
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
69
Outer joins can be either up joins or down joins.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
70
SQL is a ________.

A)data sublanguage
B)data manipulation language
C)data definition language
D)programming language
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
71
Given a table with the structure: EMPLOYEE (EmpNo,Name,Salary,HireDate),which of the following would find all employees whose name begins with the letter "S" using standard SQL?

A)SELECT *
FROM EMPLOYEE
WHERE Name IN ['S'];
B)SELECT EmpNo
FROM EMPLOYEE
WHERE Name LIKE 'S';
C)SELECT *
FROM Name
WHERE EMPLOYEE LIKE 'S*';
D)SELECT *
FROM EMPLOYEE
WHERE Name LIKE 'S%';
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
72
In an SQL query,which of the following symbols is used by ANSI SQL to represent a single unspecified character?

A)_ (underscore)
B)? (question mark)
C)* (asterisk)
D)% (percent)
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
73
Joins that show the matching rows from the joined tables plus unmatched rows from one other table in their results are called outer joins.
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
74
In an SQL query,which SQL keyword must be used to remove duplicate rows from the result table?

A)DELETE
B)DISTINCT
C)UNIQUE
D)KEY
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
75
In an SQL query,which SQL keyword actually begins the query?

A)EXISTS
B)FROM
C)SELECT
D)WHERE
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
76
When making an SQL query,we are using SQL as a(n)________.

A)DDL
B)DML
C)embedded language
D)SET
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
77
In an SQL query,which SQL keyword is used to specify the table(s)to be used?

A)EXISTS
B)FROM
C)SELECT
D)WHERE
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
78
In an SQL query,which of the following symbols is used by Microsoft Access to represent a single unspecified character?

A)_ (underscore)
B)? (question mark)
C)* (asterisk)
D)% (percent)
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
79
In an SQL query,which SQL keyword is used to sort the result table by the values in one or more columns?

A)GROUP BY
B)ORDER BY
C)SELECT
D)SORT BY
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
80
In an SQL query,which SQL keyword is used to link two conditions that both must be true for the rows to be selected?

A)AND
B)EXISTS
C)OR
D)IN
Unlock Deck
Unlock for access to all 114 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 114 flashcards in this deck.