You are on page 1of 4

Section 16 Quiz

(Answer all questions in this section)
1. CURRVAL is a pseudocolumn used to refer to a sequence number that the current user
has just generated by referencing NEXTVAL. True or False? Mark for Review
(1) Points
True (*)
False

Incorrect. Refer to Section 16 Lesson 1.
2. A sequence is a database object. True or False?
Mark for Review
(1) Points
True (*)
False

Correct
3. Which of the following best describes the function of the CURRVAL virtual column?
Mark for Review
(1) Points
The CURRVAL virtual column will increment a sequence by a specified value.
The CURRVAL virtual column will return a value of 1 for a parent record in a
hierarchical result set.
The CURRVAL virtual column will display either the physical locations or the logical
locations of the rows in the table.
The CURRVAL virtual column will display the integer that was most recently
supplied by a sequence. (*)
Correct
4. Creating a sequence with NOCACHE ensures that all numbers in the sequence's range
will be used successfully. True or False? Mark for Review
(1) Points
True
False (*)

Correct
5. A gap can occur in a sequence because a user generated a number from the sequence
and then rolled back the transaction. True or False? Mark for Review
(1) Points
True (*)
False

Correct

Section 16 Quiz
(Answer all questions in this section)
6. Evaluate this statement:
Mark for Review
(1) Points

currval (*) my_seq. To see the most recent value that you fetched from a sequence named my_seq you should reference: Mark for Review (1) Points my_seq. What will be the first five numbers generated by this sequence? 100110120130100 The CREATE SEQUENCE statement will fail because a START WITH value was not specified. CREATE SEQUENCE line_item_id_seq MINVALUE 100 MAXVALUE 130 INCREMENT BY -10 CYCLE. The CREATE INDEX creates a function-based index. 130120110100130 Correct 7. (*) The fifth number cannot be generated. The sequence will not cache a range of numbers in memory. Evaluate this statement: Mark for Review CREATE INDEX sales_idx ON oe. You create a sequence with the following statement: Mark for Review CREATE SEQUENCE my_emp_seq. (*) When the sequence exceeds its maximum value it will continue to generate numbers starting with MINVALUE. The CREATE INDEX statement creates a nonunique index.(lastval) Correct 9. 8.(currval) my_seq. (*) MINVALUE is equal to 1. (1) Points Which of the following statements about this sequence are true? (Choose two) (Choose all correct answers) MAXVALUE is 10^27 for an ascending sequence. Incorrect. (*) Correct . (1) Points Which statement is true? The CREATE INDEX statement creates a unique index. Refer to Section 16 Lesson 1.sales (status).nextval my_seq. The CREATE INDEX statement fails because of a syntax error.

Which result does this statement accomplish? An index named ADDRESS_INDEX is created on the CITY and STATE columns. The CLIENTS table contains these columns: Mark for Review (1) Points CLIENT_ID NUMBER(4) NOT NULL PRIMARY KEY LAST_NAME VARCHAR2(15) FIRST_NAME VARCHAR2(10) CITY VARCHAR2(15) STATE VARCHAR2(2) You want to create an index named ADDRESS_INDEX on the CITY and STATE columns of the CLIENTS table. Which statement is true? The statement creates a composite non-unique index. It is possible to have an indexed column in a table where a value in the table column does not exist in the index. True or False? Mark for Review (1) Points True False (*) Correct Section 16 Quiz (Answer all questions in this section) 11. first_name). The EMPLOYEES table contains these columns: Mark for Review (1) Points EMP_ID NOT NULL. Correct 12. The statement creates a composite unique index.2) You execute this statement: CREATE INDEX emp_name_idx ON employees(last_name. The statement creates a function-based index. (*) . (*) The statement fails because of a syntax error. Primary Key SSNUM NOT NULL. state). An error message is produced. You execute this statement: CREATE INDEX clients ON address_index (city. 10. and no index is created. Unique LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) DEPT_ID NUMBER Foreign Key to DEPT_ID column of the DEPARTMENTS table SALARY NUMBER(8.

The EMPLOYEES table has an index named LN_IDX on the LAST_NAME column. ALTER INDEX ln_idx TO fn_idx ON employees(first_name). Which data dictionary view would you query? Mark for Review (1) Points USER_OBJECTS USER_INDEXES USER_IND_COLUMNS (*) USER_TABLES Incorrect. You need to determine the table name and column name(s) on which the SALES_IDX index is defined. An index named CLIENTS_INDEX is created on the CLIENTS table. You want to change this index so that it is on the FIRST_NAME column instead. Correct 13. None of the above. An index named CLIENTS is created on the CITY and STATE columns. Refer to Section 16 Lesson 2. Which SQL Mark for Review statement will do this? (1) Points ALTER INDEX ln_idx ON employees(first_name). view. you cannot ALTER an index. In SQL what is a synonym? Mark for Review (1) Points A table with the same number of columns as another table A different name for a table. 14. ALTER INDEX ln_idx TO employees(first_name). or other database object (*) A table that must be qualified with a username A table with the same name as another view Correct . (*) Correct 15.