Name:     ID: 
 
Email: 

ITSE1345 Ch 2 Review

Modified True/False
Indicate whether the statement is true or false. If false, change the identified word or phrase to make the statement true.
 

 1. 

The syntax for a SQL statement gives the basic structure required to execute the statement. _________________________

 

 2. 

Each section of a statement that begins with a keyword is known as a(n) buffer. _________________________

 

 3. 

If a column alias contains a blank space, it must be enclosed in double quotation marks. _________________________

 

 4. 

The DISTINCT keyword can be used to indicate that duplicate data should be suppressed in the results of a query. _________________________

 

 5. 

CHR(25) can be included in the SELECT clause of a SELECT statement to indicate where a line break should occur. _________________________

 

Multiple Choice
Identify the choice that best completes the statement or answers the question.
 

 6. 

What is used to indicate the end of an SQL statement?
a.
/
c.
;
b.
:
d.
*
 

 7. 

Which of the following symbols represents all the columns contained in a table?
a.
/
c.
*
b.
;
d.
^
 

 8. 

The entire column heading for a column will be displayed, regardless of the assigned width of the column, if the column is defined as a(n) ____ column.
a.
character
c.
date
b.
alphanumeric
d.
numeric
 

 9. 

Which of the following are case sensitive in Oracle10g?
a.
keywords
c.
table names
b.
column names
d.
none of the above
 

 10. 

Which of the following symbols can be used to combine data from different columns into one column of output?
a.
||
c.
%
b.
^
d.
*
 

 11. 

Combining the contents of two or more columns is known as ____.
a.
projection
c.
selection
b.
concatenation
d.
suppression
 
 
Contents of the PUBLISHER table
nar001-1.jpg
 

 12. 

Based upon the contents of the PUBLISHER table, which of the following is a valid SQL statement?
a.
SELECT * FROM pubid;
b.
SELECT * FROM name;
c.
SELECT * FROM contact;
d.
SELECT * FROM publisher;
 
 

Contents of the BOOKS table
nar002-1.jpg
 

 13. 

Which of the following is a valid SQL statement?
a.
SELECT title, retail-cost FROM books;
b.
SELECT title, retail-cost "Profit"
c.
SELECT DISTINCT title, category
FROM books/
d.
all of the above
 

 14. 

Based upon the contents of the BOOKS table, which of the following SQL statements will display two columns in its output?
a.
SELECT * FROM books;
b.
SELECT title, retail-cost "Profit" FROM books;
c.
SELECT DISTINCT title FROM books;
d.
all of the above
 

 15. 

Based upon the contents of the BOOKS table, which of the following SQL statements will display the retail price for two copies of each book currently in inventory?
a.
SELECT * FROM books;
b.
SELECT title, retail+retail FROM books;
c.
SELECT title, retail^2 FROM books;
d.
none of the above
 
 
Structure of the ORDERS table
nar003-1.jpg
 

 16. 

Based upon the structure of the ORDERS table, the column heading for which column will be truncated in the results?
a.
customer#
c.
shipstreet
b.
orderdate
d.
shipzip
 

 17. 

Based upon the structure of the ORDERS table, which of the following SQL statements will return an error message upon execution?
a.
SELECT * FROM orders;
b.
SELECT order# customer# FROM orders;
c.
SELECT order#, "order number" FROM orders;
d.
both b and c
 

 18. 

To indicate which database table contains the data to be selected by a query, the table name should be listed in the ____ clause.
a.
SELECT
c.
WHERE
b.
FROM
d.
HAVING
 

 19. 

Which of the following statements is correct?
a.
The columns will be listed in the results in the same order they are stored in the database table.
b.
Character columns are listed first in the output, followed by numeric columns.
c.
The columns will be listed in the results in the same order they are listed in the SELECT clause of the SELECT statement.
d.
Numeric columns are listed first in the output, followed by character columns.
 

 20. 

What is the correct answer for the arithmetic expression 9+2*3-2 using the order of operations employed by Oracle10g when solving equations?
a.
13
c.
10
b.
31
d.
12
 

Completion
Complete each statement.
 

 21. 

If a column heading is longer than the assigned width of a character column, the column heading will be ____________________.
 

 

 22. 

Choosing specific columns in a SELECT statement is known as ____________________.
 

 

 23. 

A(n) ____________________ is an alternative column heading displayed in the output of a query.
 

 

 24. 

When resolving arithmetic expressions, Oracle10g always performs the operations by starting on the ____________________ side of the expression.
 

 

 25. 

The ____________________ command can be used to display the structure of a table.
 

 

True/False
Indicate whether the statement is true or false.
 

 26. 

An ORDBMS is more advanced than a simple RDBMS since the user can also create reports.
 

 27. 

Each section of a SQL command that begins with a keyword is known as a statement.
 

 28. 

A query is accomplished by issuing a SELECT statement.
 

 29. 

The SELECT clause of the SELECT statement is used to identify which rows are to be retrieved from a specified table.
 

 30. 

If a column name is entered in lower case in the SELECT statement, the data for the column will be displayed in lower case in the results.
 

 31. 

The columns displayed in the results of a SELECT statement will be in the same order as they are stored in the database table.
 

 32. 

Parentheses can be used to override the order of operations in an arithmetic expression.
 

 33. 

A script file containing SQL statements can be executed from SQL*Plus.
 

 34. 

A user can indicate that all columns of a table should be displayed in the results of a SELECT statement by including an asterisk (*) in the SELECT clause.
 

 35. 

The optional keyword AS can be used to indicate that the subsequent string of characters is a column alias.
 



 
         Start Over