marți, 26 februarie 2013

PROGRAMMING: Section 12

WORKING WITH SEQUENCES
A sequence is a window through which data can be queried or changed. True or False?
False
          
CURRVAL is a pseudocolumn used to refer to a sequence number that the current user has just generated by referencing NEXTVAL. True or False?
True
          
A sequence is a database object. True or False?
True
          
Which is the correct syntax for specifying a maximum value in a sequence?
Maxvalue
          
In order to be able to generate primary key values that are not likely to contain gaps, which phrase should be included in the sequence creation statement?
NOCACHE
          
Which keyword is used to remove a sequence?
Drop
         
Why do gaps in sequences occur?
All of the above
          
When you alter a sequence, a new increased MAXVALUE can be entered without changing the existing number order. True or False?
True
          
Nextval and Currval are know as column aliases. True or False?
False
          
Which keyword is used to modify a sequence?
Alter
          
CURRVAL is a pseudocolumn used to extract successive sequence numbers from a specified sequence. True or False?
False
          
Examine the code for creating this sequence:
CREATE SEQUENCE track_id_seq
INCREMENT BY 10
START WITH 1000 MAXVALUE 10000
What are the first three values that would be generated by the sequence?
1000, 1010, 1020
          

INDEXES AND SYNONYMS
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?
False
          
What kind of INDEX is created by Oracle when you create a primary key?
UNIQUE INDEX
          
All tables must have indexes on them otherwise they cannot be queried. True or False?
False
          
You must use a synonym to access another users table. True or False?
False
          
In SQL what is a synonym?
A different name for a table, view or other database object
          
Which of the following SQL statements shows a correct syntax example of creating a synonym accessible to all users of a database?
CREATE PUBLIC SYNONYM emp FOR EMPLOYEES
          
Indexes can be used to speed up queries. True or False?
True
          
Which of the following statements best describes indexes and their use?
They contain the column value and pointers to the data in the table, but the data is sorted.

Niciun comentariu:

Trimiteți un comentariu