Deck 4: Single-Table Queries

ملء الشاشة (f)
exit full mode
سؤال
SQL requires that you follow special formatting rules.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Preceding a condition by the NOT operator reverses the truth of the original condition.
سؤال
An arithmetic column is a column that does not exist in the database but can be computed using data in existing columns.
سؤال
All SELECT statements require a WHERE clause.
سؤال
Oracle supports only the <> version of the "not equal to" comparison operator.
سؤال
To specify that query results be listed in a specific order, use the SORT BY clause.
سؤال
The only arithmetic operators that can be used in SELECT statements are + for addition and - for subtraction.
سؤال
The BETWEEN operator is an essential feature of SQL.
سؤال
You can use computed columns in comparisons.
سؤال
A simple condition has the form: column name, comparison operator, and then either another column name or a value.
سؤال
When you connect two or more simple conditions with the AND operator, each condition must be listed on a separate line.
سؤال
You cannot assign names to computed columns.
سؤال
When the OR operator connects simple conditions, the compound condition will be true whenever any one of the simple conditions is true.
سؤال
In a SELECT statement, the FROM clause and the WHERE clause (when used) must appear on separate lines.
سؤال
When data is sorted on two columns, the more important column is called the major sort key.
سؤال
To sort records in descending order, follow the name of the sort key with the REVERSE operator.
سؤال
When you query a database, there is a defined order in which the results are displayed.
سؤال
The WHERE clause is used to limit the rows that are included in a query's result.
سؤال
After the word FROM in a SELECT statement, you list any conditions (restrictions) that apply to the data you want to retrieve.
سؤال
A query is a question represented in a way that the DBMS can understand.
سؤال
The MIN function determines the minimum value in a column.
سؤال
The ____ operator specifies a range of values in a condition.

A) LIKE
B) BETWEEN
C) DISTINCT
D) GROUP
سؤال
The COUNT function only applies to columns with numeric values.
سؤال
The basic form of the SQL SELECT command is ____.

A) FROM-SELECT-WHERE
B) SELECT-FROM-WHERE
C) FROM-WHERE-SELECT
D) WHERE-SELECT-FROM
سؤال
The ____ operator is inclusive, meaning that a value equal to either end would be selected.

A) AND
B) BETWEEN
C) OR
D) NOT
سؤال
It is possible to use both a WHERE clause and a HAVING clause in a SELECT statement.
سؤال
The WHERE clause applies to both rows and groups.
سؤال
You form compound conditions by connecting two or more simple conditions using the ____ operator.

A) AND
B) OR
C) NOT
D) All of the above
سؤال
In a nested query, the outer query is evaluated first.
سؤال
The UNIQUE operator eliminates duplicate values in a query.
سؤال
Sometimes a condition involves a column that can accept null values.
سؤال
In SQL, you use the ____ command to query a database.

A) WHERE
B) SELECT
C) FROM
D) SET
سؤال
The DISTINCT operator is useful when used in conjunction with the COUNT function.
سؤال
The GROUP BY clause sorts the data in a particular order.
سؤال
Which of the following operators can be used for a column computation?

A) +
B) ^
C) **
D) All of the above
سؤال
The HAVING clause is used to restrict groups.
سؤال
Aggregate functions apply to groups of rows.
سؤال
Preceding a condition by the ____ operator reverses the truth of the original condition.

A) REVERSE
B) NOT
C) NULL
D) OR
سؤال
It is possible to place one query inside another.
سؤال
In the SELECT clause, you can use the ____ symbol to indicate that you want to include all columns.

A) \
B) /
C) *
D) ?
سؤال
____________________ conditions are formed by connecting two or more simple conditions.
سؤال
You use the ____ clause to list data in a specific order.

A) ORDER
B) SET ORDER
C) ORDER BY
D) LIST BY
سؤال
When you need to sort data on two columns, the less important column is called the ____ sort key.

A) double
B) primary
C) minor
D) foreign
سؤال
In SQL for Oracle and for SQL Server, the ____ symbol is used as a wildcard to represent any collection of characters.

A) *
B) %
C) ?
D) !
سؤال
The ____ clause is used to restrict the groups that will be included.

A) LIKE
B) HAVING
C) WHERE
D) HAVE
سؤال
You can assign a name to a computed column by following the computation with the word ____________________ and the desired name.
سؤال
A(n) ____________________ column is a column that does not exist in the database but can be computed using data in the existing columns.
سؤال
The ____ operator finds rows that do not contain a null value in the specified column.

A) IS NULL
B) NOT NULL
C) !NULL
D) IS NOT NULL
سؤال
The ____________________ operator uses one or more wildcard characters to test for a pattern match.
سؤال
You can use the ____ operator followed by a collection of values to provide a concise way of phrasing certain conditions.

A) LIKE
B) CONTAIN
C) VALUES
D) IN
سؤال
The ____ function determines the number of rows in a table.

A) ROW
B) CALCULATE
C) COUNT
D) NUMBER
سؤال
The ____ wildcard symbol represents any individual character.

A) %
B) _
C) /
D) \
سؤال
A(n) ____________________ clause provides a concise way of phrasing certain conditions.
سؤال
The ____ function calculates a total of the values in a column.

A) TOTAL
B) CALCULATE
C) SUM
D) ADD
سؤال
The ____ clause lets you group data on a particular column.

A) GROUP
B) GROUP BY
C) SET GROUP
D) GROUPING
سؤال
When you use the ____ function, you can use the asterisk (*) to represent any column.

A) SUM
B) COUNT
C) MAX
D) MIN
سؤال
When the ____________________ operator connects simple conditions, all the simple conditions must be true in order for the compound condition to be true.
سؤال
You use the ____________________ clause to retrieve rows that satisfy some condition.
سؤال
The ____ operator uses one or more wildcard characters to test for a pattern match.

A) PATTERN
B) LIKE
C) MATCH
D) SIMILAR
سؤال
A(n) ____________________ is simply a question represented in a way that the DBMS can understand.
سؤال
How do you construct the SELECT query?
سؤال
The ____________________ operator finds rows that contain a null value in the specified column.
سؤال
The column on which data is to be sorted is called a sort ____________________.
سؤال
When you need to sort data on two columns, the more important column is called the ____________________ sort key.
سؤال
You can use the ____________________ clause to limit the groups that are included.
سؤال
SQL has special functions, called ____________________ functions, to calculate sums, averages, counts, maximum values, and minimum values.
سؤال
When you use the ____________________ function, you must specify the column to total, and the column data type must be numeric.
سؤال
To sort records in descending order, follow the name of the sort key with the ____________________ operator.
سؤال
Describe simple and compound conditions.
سؤال
Compare the WHERE and HAVING clauses.
سؤال
The inner query in a nested query is called a(n) ____________________.
سؤال
The ____________________ operator eliminates duplicate values in the query results.
سؤال
____________________ creates groups of rows that share some common characteristic.
سؤال
When you use the MAX function, SQL ignores any ____________________ value(s) in the column and eliminates them from the computations.
سؤال
In SQL, you specify the order of data in query results by using the ____________________ clause.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/75
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 4: Single-Table Queries
1
SQL requires that you follow special formatting rules.
False
2
Preceding a condition by the NOT operator reverses the truth of the original condition.
True
3
An arithmetic column is a column that does not exist in the database but can be computed using data in existing columns.
False
4
All SELECT statements require a WHERE clause.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
5
Oracle supports only the <> version of the "not equal to" comparison operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
6
To specify that query results be listed in a specific order, use the SORT BY clause.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
7
The only arithmetic operators that can be used in SELECT statements are + for addition and - for subtraction.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
8
The BETWEEN operator is an essential feature of SQL.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
9
You can use computed columns in comparisons.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
10
A simple condition has the form: column name, comparison operator, and then either another column name or a value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
11
When you connect two or more simple conditions with the AND operator, each condition must be listed on a separate line.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
12
You cannot assign names to computed columns.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
13
When the OR operator connects simple conditions, the compound condition will be true whenever any one of the simple conditions is true.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
14
In a SELECT statement, the FROM clause and the WHERE clause (when used) must appear on separate lines.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
15
When data is sorted on two columns, the more important column is called the major sort key.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
16
To sort records in descending order, follow the name of the sort key with the REVERSE operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
17
When you query a database, there is a defined order in which the results are displayed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
18
The WHERE clause is used to limit the rows that are included in a query's result.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
19
After the word FROM in a SELECT statement, you list any conditions (restrictions) that apply to the data you want to retrieve.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
20
A query is a question represented in a way that the DBMS can understand.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
21
The MIN function determines the minimum value in a column.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
22
The ____ operator specifies a range of values in a condition.

A) LIKE
B) BETWEEN
C) DISTINCT
D) GROUP
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
23
The COUNT function only applies to columns with numeric values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
24
The basic form of the SQL SELECT command is ____.

A) FROM-SELECT-WHERE
B) SELECT-FROM-WHERE
C) FROM-WHERE-SELECT
D) WHERE-SELECT-FROM
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
25
The ____ operator is inclusive, meaning that a value equal to either end would be selected.

A) AND
B) BETWEEN
C) OR
D) NOT
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
26
It is possible to use both a WHERE clause and a HAVING clause in a SELECT statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
27
The WHERE clause applies to both rows and groups.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
28
You form compound conditions by connecting two or more simple conditions using the ____ operator.

A) AND
B) OR
C) NOT
D) All of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
29
In a nested query, the outer query is evaluated first.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
30
The UNIQUE operator eliminates duplicate values in a query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
31
Sometimes a condition involves a column that can accept null values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
32
In SQL, you use the ____ command to query a database.

A) WHERE
B) SELECT
C) FROM
D) SET
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
33
The DISTINCT operator is useful when used in conjunction with the COUNT function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
34
The GROUP BY clause sorts the data in a particular order.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
35
Which of the following operators can be used for a column computation?

A) +
B) ^
C) **
D) All of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
36
The HAVING clause is used to restrict groups.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
37
Aggregate functions apply to groups of rows.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
38
Preceding a condition by the ____ operator reverses the truth of the original condition.

A) REVERSE
B) NOT
C) NULL
D) OR
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
39
It is possible to place one query inside another.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
40
In the SELECT clause, you can use the ____ symbol to indicate that you want to include all columns.

A) \
B) /
C) *
D) ?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
41
____________________ conditions are formed by connecting two or more simple conditions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
42
You use the ____ clause to list data in a specific order.

A) ORDER
B) SET ORDER
C) ORDER BY
D) LIST BY
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
43
When you need to sort data on two columns, the less important column is called the ____ sort key.

A) double
B) primary
C) minor
D) foreign
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
44
In SQL for Oracle and for SQL Server, the ____ symbol is used as a wildcard to represent any collection of characters.

A) *
B) %
C) ?
D) !
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
45
The ____ clause is used to restrict the groups that will be included.

A) LIKE
B) HAVING
C) WHERE
D) HAVE
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
46
You can assign a name to a computed column by following the computation with the word ____________________ and the desired name.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
47
A(n) ____________________ column is a column that does not exist in the database but can be computed using data in the existing columns.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
48
The ____ operator finds rows that do not contain a null value in the specified column.

A) IS NULL
B) NOT NULL
C) !NULL
D) IS NOT NULL
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
49
The ____________________ operator uses one or more wildcard characters to test for a pattern match.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
50
You can use the ____ operator followed by a collection of values to provide a concise way of phrasing certain conditions.

A) LIKE
B) CONTAIN
C) VALUES
D) IN
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
51
The ____ function determines the number of rows in a table.

A) ROW
B) CALCULATE
C) COUNT
D) NUMBER
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
52
The ____ wildcard symbol represents any individual character.

A) %
B) _
C) /
D) \
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
53
A(n) ____________________ clause provides a concise way of phrasing certain conditions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
54
The ____ function calculates a total of the values in a column.

A) TOTAL
B) CALCULATE
C) SUM
D) ADD
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
55
The ____ clause lets you group data on a particular column.

A) GROUP
B) GROUP BY
C) SET GROUP
D) GROUPING
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
56
When you use the ____ function, you can use the asterisk (*) to represent any column.

A) SUM
B) COUNT
C) MAX
D) MIN
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
57
When the ____________________ operator connects simple conditions, all the simple conditions must be true in order for the compound condition to be true.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
58
You use the ____________________ clause to retrieve rows that satisfy some condition.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
59
The ____ operator uses one or more wildcard characters to test for a pattern match.

A) PATTERN
B) LIKE
C) MATCH
D) SIMILAR
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
60
A(n) ____________________ is simply a question represented in a way that the DBMS can understand.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
61
How do you construct the SELECT query?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
62
The ____________________ operator finds rows that contain a null value in the specified column.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
63
The column on which data is to be sorted is called a sort ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
64
When you need to sort data on two columns, the more important column is called the ____________________ sort key.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
65
You can use the ____________________ clause to limit the groups that are included.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
66
SQL has special functions, called ____________________ functions, to calculate sums, averages, counts, maximum values, and minimum values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
67
When you use the ____________________ function, you must specify the column to total, and the column data type must be numeric.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
68
To sort records in descending order, follow the name of the sort key with the ____________________ operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
69
Describe simple and compound conditions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
70
Compare the WHERE and HAVING clauses.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
71
The inner query in a nested query is called a(n) ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
72
The ____________________ operator eliminates duplicate values in the query results.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
73
____________________ creates groups of rows that share some common characteristic.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
74
When you use the MAX function, SQL ignores any ____________________ value(s) in the column and eliminates them from the computations.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
75
In SQL, you specify the order of data in query results by using the ____________________ clause.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.