You are on page 1of 4

Section 13 Quiz

(Answer all questions in this section)
1. Evaluate this CREATE TABLE statement:
Mark for Review
(1) Points
( sales_id NUMBER(9),
customer_id NUMBER(9),
employee_id NUMBER(9),
description VARCHAR2(30),
sale_amount NUMBER(7,2));

Which business requirement will this statement accomplish?
Description values can range from 0 to 30 characters so the column should be
fixed in length.
Sales identification values could be either numbers or characters, or a combination
of both.
All employee identification values are only 6 digits so the column should be
variable in length.
Today's date should be used if no value is provided for the sale date. (*)

2. The SPEED_TIME column should store a fractional second value.
Mark for Review
(1) Points
Which data type should you use?

3. A column that will be used to store binary data up to 4 Gigabytes in size should be
defined as which datatype? Mark for Review
(1) Points
BLOB (*)

4. Which of the following are valid Oracle datatypes?
Mark for Review
(1) Points

and # (*) Must be an Oracle reserved word Must be between 1 to 30 characters long (*) Must begin with a letter (*) Correct . (*) impossible. TIMESTAMP. Table and column names must begin with a letter. Which statement about table and column names is true? Mark for Review (1) Points If any character other than letters or numbers is used in a table or column name. To store large amounts of text you should simply create a series of VARCHAR2 columns in a table. VARCHAR2. the name must be enclosed in double quotation marks. there can never be two tables with the same name. True or False? Mark for Review (1) Points True False (*) Correct Section 13 Quiz (Answer all questions in this section) 6. School_Friends is a reserved term in SQL. LOB. a . Correct 8. my schema is separate from yours. (Choose three) Mark for Review (1) Points (Choose all correct answers) Can have the same name as another object owned by the same user Must contain ONLY A . because Mark for Review ____________________________________. which of the following naming rules apply. NUMBER Correct 5.z. even if they are in separate schemas. impossible. You want to build a table in your schema named School_Friends. Correct 7. I have a table named School_Friends in my schema.9. Table and column names cannot include special characters. (1) Points possible. possible. $. (*) Table and column names can begin with a letter or a number. and it is okay for us to have like- named tables in our separate schemas. _ (underscore). This is ______________.Z. no matter what. When creating a new table. and we can more easily access our mutual friends information. our data will merge into one table. 0 .

True or False? Mark for Review (1) Points True (*) False Correct 13. by performing a logical drop of the column (*) Prevents a new FAX column from being added to the EMPLOYEES table Deletes the FAX column Correct 12. After issuing a SET UNUSED command on a column. Correct 10. CREATE TABLE customer#1 ( 2. BIRTHDATE). name and date of birth? Mark for Review (1) Points CREATE table BIRTHDAYS (employee number. Mark for Review (1) Points Which task will this statement accomplish? Frees the disk space used by the data in the FAX column Prevents data in the FAX column from being displayed. EMPNAME. date of birth). Empname CHAR(20). 2date DATE DEFAULT SYSDATE). Birthdate DATE). Evaluate this statement: ALTER TABLE employees SET UNUSED (fax). 9. sales$ NUMBER(9). Which line of this statement will cause an error? 4 (*) 2 1 3 Correct Section 13 Quiz (Answer all questions in this section) 11. another column with the same name can be added using an ALTER TABLE statement. Evaluate this CREATE TABLE statement: Mark for Review (1) Points 1. (*) CREATE table BIRTHDAYS (EMPNO. Date of Birth DATE). CREATE TABLE Birthdays (Empno NUMBER. cust_1 NUMBER(9). CREATE TABLE Birthdays (Empno NUMBER. 4. Empname CHAR(20). name. Which of the following SQL statements will create a table called Birthdays with three columns for storing employee number. Mark for Review (1) Points DONATIONS: . 3. Examine the structure of the DONATIONS table.

Correct 15. You can use the ALTER TABLE statement to: Mark for Review (1) Points Add a new column Modify an existing column Drop a column All of the above (*) Correct . You must drop and recreate the DONATIONS table to achieve these results. Both changes can be accomplished with one ALTER TABLE statement.2) PAYMENT_DT DATE You need to reduce the precision of the AMOUNT_PLEDGED column to 5 with a scale of 2 and ensure that when inserting a row into the DONATIONS table without a value for the AMOUNT_PLEDGED column. The DONATIONS table currently contains NO records. Which statement is true? You must use the ADD OR REPLACE option to achieve these results. The PLAYERS table contains these columns: Mark for Review (1) Points PLAYER_ID NUMBER(9) PRIMARY KEY LAST_NAME VARCHAR2(20) FIRST_NAME VARCHAR2(20) TEAM_ID NUMBER(4) SALARY NUMBER(9.00 will automatically be inserted.2) Which statement should you use to decrease the width of the FIRST_NAME column to 10 if the column currently contains 1500 records. ALTER players TABLE MODIFY COLUMN first_name VARCHAR2(10). ALTER players TABLE MODIFY COLUMN (first_name VARCHAR2(10)). You CANNOT decrease the width of the AMOUNT_PLEDGED column. (*) ALTER TABLE players RENAME first_name VARCHAR2(10). a price of $10.2) AMOUNT_PAID NUMBER (7. but none are longer than 10 bytes or characters? ALTER TABLE players MODIFY (first_name VARCHAR2(10)). (*) Correct 14. PLEDGE_ID NUMBER DONOR_ID NUMBER PLEDGE_DT DATE AMOUNT_PLEDGED NUMBER (7.