Test: Quiz: Creating Tables

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

Section 1

1.  Once they are created, external tables are accessed with normal SQL statements? (True or False)Mark for Review
(1) Points

True (*)

False

 

2.  Given this employee table: (employee_id NUMBER(10) NOT NULL,
first_name VARCHAR2(25) NOT NULL,
last_name VARCHAR2(30) NOT NULL,
hire_date DATE DEFAULT sysdate)
What will be the result in the hire_date column following this insert statement:
INSERT INTO employees VALUES (10, 'Natacha', 'Hansen', DEFAULT);Mark for Review
(1) Points

Statement will fail, as you must list the columns into which you are inserting.

Statement will work and the hire_date column will have the value of the date when the statement was run. (*)

The character string SYSDATE.

The column for hire_date will be null.

 

3.  CREATE TABLE bioclass
(hire_date DATE DEFAULT SYSDATE,
first_name varchar2(15),
last_name varchar2(15)); The above CREATE TABLE statement is acceptable, and will create a Table named bioclass that contains a hire_date, first_name and last_name column. True or False?Mark for 
(1) Points

True (*)

False

 

4.  When creating a new table, which of the following naming rules apply: (Choose three)Mark for Review
(1) Points

(Choose all correct answers)

Must begin with a letter (*)

Can have the same name as another object owned by the same user

Must contain ONLY A - Z, a - z, 0 - 9, _ (underscore), $, and # (*)

Must be an Oracle reserved word

Must be between 1 and 30 characters long (*)

 

5.  CREATE TABLE student_table
(id NUMBER(6),
lname VARCHAR(20),
fname VARCHAR(20),
lunch_num NUMBER(4)); Which of the following statements best describes the above SQL statement:Mark for Review
(1) Points

creates a table named student_table with four columns: lname, fname, lunch, num

creates a table named student with four columns: id, lname, fname, lunch_num

creates a table named student_table with four columns: id, lname, fname, lunch_num (*)

creates a table named student_table with four columns: lname, fname, lunch, num

 

6.  Examine this CREATE TABLE statement: CREATE TABLE emp_load
(employee_number CHAR(5),
employee_dob CHAR(20),
employee_last_name CHAR(20),
employee_first_name CHAR(15),
employee_middle_name CHAR(15),
employee_hire_date DATE)
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY def_dir1
ACCESS PARAMETERS
(RECORDS DELIMITED BY NEWLINE
FIELDS (employee_number CHAR(2),
employee_dob CHAR(20),
employee_last_name CHAR(18),
employee_first_name CHAR(11),
employee_middle_name CHAR(11),
employee_hire_date CHAR(10) date_format DATE mask "mm/dd/yyyy“))
LOCATION ('info.dat'));
What kind of table is created here?Mark for Review
(1) Points

An external table with the data stored in a file outside the database. (*)

A View.

An external table with the data stored in a file inside the database.

None. This is in invalid statement.

 

7.  I have a table named School_Friends in my schema. You want to build a table in your schema named School_Friends. This is ______________, because ____________________________________.Mark for Review
(1) Points

possible; my schema is separate from yours, and it is okay for us to have like-named tables in our separate schemas. (*)

possible; our data will merge into one table, and we can more easily access our mutual friends information.

impossible; no matter what, there can never be two tables with the same name, even if they are in separate schemas.

impossible; School_Friends is a reserved term in SQL.

 

8.  DCL, which is the acronym for Data Control Language, allows:Mark for Review
(1) Points

the ALTER command to be used.

a Database Administrator the ability to grant privileges to users. (*)

the TRUNCATE command to be used.

the CONTROL TRANSACTION statement can be used.

 

9.  It is possible to create a table by using the CREATE TABLE command in conjunction with a subquery. True or False?Mark for Review
(1) Points

True (*)

Solution for Test: Quiz: Introduction to The Oracle Academy
Solution for Test: Quiz: Data vs Information
Top