978-0134601533 Chapter 3 Part 1

subject Type Homework Help
subject Pages 9
subject Words 2596
subject Authors David Auer, David M. Kroenke, Scott L. Vandenberg

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Database Concepts, 8e (Kroenke)
Chapter 3 Structured Query Language
1) The result for SELECT statements in SQL is a relation unless the result is a single number.
2) To force the DBMS to remove duplicate rows from the results of an SQL SELECT query, the
keyword DISTINCT must be used.
3) In SQL, the WHERE clause is used to specify which columns will be included in the result.
4) In SQL, multiple conditions in the WHERE clause can be combined by using the SQL AND
keyword.
5) In SQL, to refer to a range of values in a WHERE clause, use the WITHIN keyword.
6) In SQL, the NOT keyword can be combined with the IN keyword to form the NOT IN
condition for selecting values.
page-pf2
7) In SQL, the LIKE keyword can be used to select on partial values.
8) In SQL, the LIKE keyword can be combined with the NOT keyword to form the NOT LIKE
condition for selecting values.
9) In SQL, the IS NULL keyword can be used to select on records containing NULL values in a
particular column.
10) In SQL, the order of the rows that result from a SELECT statement can be set using the
SORT BY phrase.
11) The SUM built-in function in SQL is used to total the values in a numeric column.
12) The TOP built-in function in SQL is used to find the maximum value in a numeric column.
page-pf3
13) Standard SQL does not allow built-in functions to be used in a WHERE clause.
14) The SQL GROUP BY keyword can be used to group rows by common values.
15) Built-in SQL functions cannot be applied to data combined using the GROUP BY keyword.
16) The order of the columns returned by an SQL SELECT statement is determined by the
________.
A) ORDER BY clause
B) SORT BY clause
C) order they are listed in following SELECT
D) order they are listed in following WHERE
E) order they are listed in following FROM
17) Which SQL keyword is used to eliminate duplicate rows in the results of an SQL SELECT
query?
A) UNIQUE
B) SORT
C) ORDER BY
D) DISTINCT
E) REDUCE
page-pf4
18) Which SQL keyword is used to specify a condition that rows must meet to be included in the
results of an SQL SELECT query?
A) SELECT
B) FROM
C) WHERE
D) ORDER BY
E) GROUP BY
19) Conditions after the WHERE keyword require single quotes around the values for columns
that have which data type?
A) Char
B) Date/Time
C) Integer
D) Numeric
E) Decimal
20) Which of the following is the correct SQL clause to restrict the results of a SELECT query to
only records that have a value in the range of 10 to 50 in the Hours column?
A) WHERE Hours = MIN(10) and MAX(50)
B) WHERE Hours IN [10, 50]
C) WHERE Hours = 10 and Hours = 50
D) WHERE Hours BETWEEN 10 AND 50
E) WHERE Hours RANGE 10 TO 50
page-pf5
21) Which symbol is used in standard SQL as a wildcard to represent a single, unspecified
character?
A) % (percent sign)
B) ! (exclamation mark)
C) _ (underscore)
D) ? (question mark)
E) ; (semi-colon)
22) Which symbol is used in standard SQL as a wildcard to represent a series of one or more
unspecified characters?
A) % (percent sign)
B) ! (exclamation mark)
C) _ (underscore)
D) ? (question mark)
E) ; (semi-colon)
23) Which SQL keyword can be used in conjunction with wildcards to select partial values?
A) SELECT
B) SEARCH
C) FIND
D) SUBSTRING
E) LIKE
page-pf6
24) Which of the following is the correct SQL clause to sort the results of a SELECT query in
reverse-alphabetic order using the Department field?
A) SORT BY Department
B) REVERSE Department
C) ORDER BY Department DESC
D) SORT BY Department DESC
E) SORT BY Department REVERSE
25) Which of the following is not one of the five SQL built-in functions?
A) MODE
B) SUM
C) COUNT
D) MAX
E) AVG
26) Given the table
CUSTOMER(CustID, Name, PhoneNum, AcctBalance)
what is the standard SQL query phrase to retrieve the Name and Phone Number of customers?
A) SELECT CUSTOMER-Name AND CUSTOMER-PhoneNum
B) SELECT (CUSTOMER-Name AND CUSTOMER-PhoneNum)
C) SELECT Name, PhoneNum
D) SELECT (Name, PhoneNum)
E) SELECT *
page-pf7
27) Given the table
CUSTOMER(CustID, Name, PhoneNum, AcctBalance)
what is the standard SQL query phrase to retrieve data for customers with an account balance
greater than 50?
A) WHERE CUSTOMER-AcctBalance > 50
B) WHERE (CUSTOMER-AcctBalance > 50)
C) WHERE AcctBalance > 50
D) WHERE (AcctBalance > 50)
E) HAVING AcctBalance > 50
28) Which SQL keyword is used to apply conditions to restrict groups that appear in the results
of a SELECT query that uses GROUP BY?
A) WHERE
B) HAVING
C) LIKE
D) SORT
E) DISTINCT
29) Microsoft Access SQL commands are run in ________.
A) the SQL window
B) the QBE window
C) the Query View of an SQL window
D) the Design View of a Query window
E) the SQL View of a Query window
page-pf8
30) One way to specify all of the columns of a table is to use the special character * after the
SQL keyword ________.
31) Conditions in an SQL INSERT command and after the SQL ________ keyword require
single quotes around values for Char and VarChar columns, but not around values for Integer
and Numeric columns.
32) Given the table
CUSTOMER(CustID, Name, PhoneNumber, AccountBalance)
write the standard SQL query to retrieve the Name and Phone Number of customers with a
balance greater than 50.
33) Given the table
CUSTOMER(CustID, Name, PhoneNumber, AccountBalance)
write the standard SQL query to retrieve the Name and Phone Number of customers whose name
begins with 'S'.
page-pf9
34) What are SQL Built-in Functions?
35) Distinguish between the HAVING clause and the WHERE clause.
36) Data is added to a table using the SQL INSERT command.
37) Given the table STUDENT(StudentID, Name, Advisor), which of the following SQL
statements would be used to add new student data to the STUDENT table?
A) INSERT DATA STUDENT SET StudentID=123, Name='Jones', Advisor='Smith';
B) INSERT INTO STUDENT VALUES (123, 'Jones', 'Smith');
C) INSERT INTO STUDENT (New Student Data) VALUES (123, 'Jones', 'Smith');
D) INPUT DATA STUDENT SET StudentID=123, Name=' Jones', Advisor='Smith';
E) INPUT INTO STUDENT (123, 'Jones', 'Smith');
page-pfa
38) To open a new Microsoft Access Query window ________.
A) click the New button on the Home command tab
B) click the New Query button on the Home command tab
C) click the Create Query button on the Create command tab
D) click the New Query in Design view button on the Create command tab
E) click the Query Design button on the Command tab
39) In Microsoft Access, tables are added to a Query window by ________.
A) selecting the tables from the Use Table dialog box
B) selecting the tables from the Show Table dialog box
C) selecting the tables from the Tables section of the Navigation Pane
D) selecting the tables from the Queries section of the Navigation Pane
E) selecting the tables from the Relationships window
40) The SQL command used to add new data to a table is ________.
41) SQL is a data sublanguage, not a complete programming language.
42) When using SQL to create a table, a column is defined by declaring, in this order: data type,
column name, and optional constraints.
page-pfb
43) When using SQL to create a table, specifying the NULL property for a column indicates that
only null values may be stored in that column.
44) When using SQL to create a table, specifying a data type of Char(10) indicates a fixed length
field of 10 characters.
45) For a column to be defined as the primary key using table constraints, the column must have
been given the property NULL.
46) If you need to create a primary key that is a composite key using SQL, the key may be
defined when the table is created using the CREATE TABLE statement.
47) Referential integrity constraints can be created using the ON DELETE phrase when the table
is created using the CREATE TABLE statement.
48) Referential integrity constraints using the ON DELETE NO ACTION phrase may be
explicitly stated when the table is created using the CREATE TABLE statement.

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.