Completion Complete each
statement.
|
|
|
1.
|
A table name can contain a maximum of ____________________ characters.
|
|
|
2.
|
The ____________________ command can be used to modify the structure of a
table.
|
|
|
3.
|
When adding a column to an existing table, the ____________________ clause must
be used with the ALTER TABLE command.
|
|
|
4.
|
The ____________________ clause of the ALTER TABLE command can be used to change
the size of a column.
|
|
|
5.
|
The name of a table can be changed with the ____________________ command.
|
True/False Indicate whether the
statement is true or false.
|
|
|
6.
|
A column name can consist of up to 225 characters.
|
|
|
7.
|
The maximum width of a VARCHAR2 column is 2000 characters.
|
|
|
8.
|
The scale of a NUMBER column indicates the number of digits that can be
displayed to the right of the decimal point.
|
|
|
9.
|
A table can contain a maximum of 225 columns.
|
|
|
10.
|
Only one column can be added to an existing table at one time.
|
|
|
11.
|
You cannot delete the last column in a table.
|
|
|
12.
|
A table that has been dropped without the PURGE option can be retrieved using
the FLASHBACK TABLE command.
|
Modified True/False Indicate
whether the statement is true or false. If false, change the identified word or phrase to make
the statement true.
|
|
|
13.
|
SELECT9 is a valid table name. _________________________
|
|
|
14.
|
The maximum width of a NUMBER column is 25 digits.
_________________________
|
|
|
15.
|
The default size of the CHAR column is 2.
_________________________
|
|
|
16.
|
The CREATE TABLE command is used to create a table in Oracle10g.
_________________________
|
|
|
17.
|
More than one column can be changed at a time with the ALTER
TABLE...MODIFY command. _________________________
|
|
|
18.
|
A table must contain a minimum of two columns.
_________________________
|
|
|
19.
|
The structure of a table can be viewed by issuing the STRUCTURE
command.
|
Multiple Choice Identify the
choice that best completes the statement or answers the question.
|
|
|
20.
|
Which of the following terms refers to commands that are used to create or
modify database tables?
a. | data manipulation language (DML) | c. | data definition language
(DDL) | b. | data control language (DCL) | d. | data formatting language
(DFL) |
|
|
|
21.
|
Which of the following is a valid column name?
a. | VARCHAR2 | c. | NEW_COLUMN | b. | DISTINCT | d. | CHAR |
|
|
|
22.
|
Which of the following symbols cannot be used in a table name?
a. | _ | c. | # | b. | % | d. | none of the
above |
|
|
|
23.
|
Which of the following is a valid table name in Oracle10g?
a. | jimm8 Y%c _5_H76ang | c. | 2LaN_n23_es#M#m | b. | S_c#oT#2t_321sM#_i_T6h | d. | mAU$reE78_&_n1 |
|
|
|
24.
|
A(n) ____ simply identifies the type of data that Oracle10g will be
expected to store in a column.
a. | data definition | c. | datatype | b. | data format | d. | data record |
|
|
|
25.
|
If a column is defined as NUMBER(5,2), which of the following is true?
a. | The column can store a total of 7 digits, with 5 on the left side of the decimal
point, and 2 on the right. | b. | The column can store a total of 7 digits, all
of them on the right side of the decimal point. | c. | The column can store a total of 5 digits, with
3 on the left side of the decimal point, and 2 on the right. | d. | The column can store
a total of 5 digits, all of them on the left side of the decimal
point. |
|
|
|
26.
|
In which format does Oracle10g display a date value?
a. | DD-MON-YEAR | c. | DD-MM-YY | b. | DAY-MM-YY | d. | DD-MON-YY |
|
|
|
27.
|
If a new table is being created based upon a subquery, the subquery must be
enclosed in which of the following symbols?
|
|
|
28.
|
To delete all the rows in a table and free up the storage space that was
occupied by those rows, the ____ command should be used.
a. | ALTER TABLE...DELETE | c. | TRUNCATE TABLE | b. | TRUNCATE ROWS | d. | DELETE...FROM |
|
|
|
29.
|
Which of the following keywords is used to remove a database table in
Oracle10g?
a. | DROP TABLE | c. | DELETE TABLE | b. | ALTER TABLE...DROP | d. | TRUNCATE TABLE |
|
|
|
30.
|
Which of the following keywords is used to mark a column for deletion at a later
time?
a. | ALTER TABLE...MARK UNUSED | c. | ALTER TABLE...DROP
UNUSED | b. | ALTER TABLE...SET UNUSED | d. | ALTER TABLE...SET COLUMN |
|
|
|
Structure of the CUSTOMERS table 
|
|
|
31.
|
Which of the following commands will add a new column named FIRSTORDERDATE to
the CUSTOMERS table to store the date that the customer first placed an order with the
company?
a. | CREATE COLUMN firstorderdate, DATE TO customers; | b. | ALTER TABLE
customers ADD COLUMN firstorderdate DATE; | c. | ALTER TABLE customers ADD firstorderdate
DATE; | d. | ALTER TABLE customers ADD (firstorderdate DATE); |
|
|
|
32.
|
Which of the following commands will change the name of the LASTNAME column to
LAST_NAME in the CUSTOMERS table?
a. | ALTER TABLE customers MODIFY lastname to last_name; | b. | ALTER TABLE
customers CHANGE lastname to last_name; | c. | ALTER TABLE customers MODIFY (lastname,
last_name); | d. | none of the above |
|
|
|
33.
|
Which of the following commands will increase the size of the CITY column in the
CUSTOMERS table from 12 to 20 and increase size of the LASTNAME column from 10 to 14?
a. | ALTER TABLE customers MODIFY (city VARCHAR2(+8), lastname
VARCHAR2(+4)); | b. | ALTER TABLE customers MODIFY (city VARCHAR2(20), lastname
VARCHAR2(14)); | c. | ALTER TABLE customers MODIFY (city (+8), lastname (+4)); | d. | ALTER TABLE
customers MODIFY (city (20), lastname (14)); |
|
|
|
Structure of the PROMOTION table 
|
|
|
34.
|
Which of the following SQL statements was most likely used to create the
PROMOTION table?
a. | CREATE TABLE promotion (gift VARCHAR2(15), minretail NUMBER(5,
2), maxretail NUMBER(5, 2)); | b. | CREATE TABLE promotion AS
(gift VARCHAR2(15), minretail NUMBER(5, 2), maxretail NUMBER(5, 2)); | c. | CREATE TABLE
promotion ADD (gift VARCHAR2(15), minretail NUMBER(5, 2), maxretail NUMBER(5,
2)); | d. | CREATE TABLE promotion (gift VARCHAR2(15), minretail NUMBER(5,
2), maxretail NUMBER(5, 2); |
|
|
|
35.
|
Which of the following commands will change the name of the PROMOTION table to
GIFT?
a. | ALTER TABLE promotion NAME TO gift; | b. | ALTER TABLE promotion TO
gift; | c. | RENAME TABLE promotion TO gift; | d. | RENAME promotion TO
gift; |
|
|
|
36.
|
Which of the following is a valid SQL statement?
a. | CREATE TABLE newname (colA NUMBER, colB DATE); | b. | CREATE TABLE newname
as SELECT * FROM books; | c. | CREATE TABLE newname (colA,
colB); | d. | CREATE TABLE newname (colA DATE, colB VARCHAR2(3); |
|
Essay
|
|
|
37.
|
What is the difference between truncating a table and dropping a table?
|