Quiz
Using DDL Statements to Create and Manage Tables ( Section 2)
Questions in this quiz (16)
1A table is which of the following?
- AA schema object
- BA nonschema object
- CA role
- DAll of these
2Which of the following are schema objects? (Choose all that apply.)
- ASEQUENCE
- BPASSWORD
- CINDEX
- DROLE
3A CONSTRAINT is assigned to which of the following?This
- ATABLE
- BSYNONYM
- CSEQUENCE
- DINDEX
4Which of the following are valid CREATE TABLE statements? (Choose three.)
- ACREATE TABLE $ORDERS
(ID NUMBER,
NAME VARCHAR2(30)); - BCREATE TABLE CUSTOMER_HISTORY
(ID NUMBER,
NAME VARCHAR2(30)); - CCREATE TABLE "Boat Inventory"
(ID NUMBER,
NAME VARCHAR2(30)); - DCREATE TABLE workSchedule
(ID NUMBER,
NAME VARCHAR2(30));
- ACREATE TABLE $ORDERS
5Which of the following options can be used with the reserved word CREATE to form the beginning of a complete SQL statement? (Choose three.)
- ATABLE
- BVIEW
- CCONSTRAINT
- DSEQUENCE
6You are logged in to user FINANCE. It is currently the only schema in the entire database. The following exist in the database:
A VIEW named VENDORS
A CONSTRAINT named VENDORS
An INDEX named CUSTOMER#ADDRESS
- AThe question is flawed because you cannot have an INDEX named CUSTOMER#ADDRESS.
- BThe question is flawed because you cannot have a VIEW and a CONSTRAINT with identical names in the same schema.
- CThe SQL statement will fail to execute and result in an error message because you cannot create a TABLE name with the # character.
- DThe SQL statement will fail to execute and result in an error message because you cannot create a TABLE that has the same name as an INDEX in the same schema.
- EThe SQL statement will execute, and the TABLE will be created.
7You have a single database, with only one schema. The following four objects exist in the database:
A TABLE named PRODUCT_CATALOG
A TABLE named ADS
A USER named PRODUCT_CATALOG
A VIEW named CONFERENCE_SCHEDULE
How many of the four objects are owned by the schema?- A0
- B2
- C3
- D4
8Which of the following is true about ROLES?
- ARoles are schema objects but only when created from within a user account.
- BRoles are in the same namespace as CONSTRAINTS.
- CRoles are in the same namespace as TABLES.
- DRoles are in the same namespace as USERS.
9The DESC command can be used to do which of the following?
- AShow a table's columns and the data types of those columns
- BShow a brief paragraph describing what the table does
- CShow a table's name and who created it
- DShow the data that is contained within a table
10Which one of the following is true?

- AThe execution fails because there is no precision indicated for NUMBER.
- BThe execution fails because there is no precision indicated for VARCHAR2.
- CThe execution fails because there is no precision indicated for CHAR.
- DThe execution succeeds, and the table is created.
11What is the displayed output of the SELECT statement?

- A3.1415
- B3.142
- C3.141
- DNone of these
12Which of the following SQL statements creates a table that will reject attempts to INSERT a row with NULL values entered into the POSITION_ID column?
- ACREATE TABLE POSITIONS
(POSITION_ID NUMBER(3),
CONSTRAINT POSITION_CON UNIQUE (POSITION_ID)); - BCREATE TABLE POSITIONS
(POSITION_ID NUMBER(3),
CONSTRAINT POSITION_CON PRIMARY KEY (POSITION_ID)); - CCREATE TABLE POSITIONS
(POSITION_ID NUMBER(3),
CONSTRAINT POSITION_CON REQUIRED (POSITION_ID)); - DNone of these
- ACREATE TABLE POSITIONS
13Assume there is no table already called SHIPPING_ORDER in the database. What will be the result of an attempt to execute the preceding SQL statement?

- AThe statement will fail because the data type for ORDER_YEAR is a CHAR, and CHAR data types aren't allowed in a PRIMARY KEY constraint.
- BThe statement will fail because there is no precision for the ORDER_ID column's data type.
- CThe table will be created, but the primary key constraint will not be created because the name does not include the _PK suffix.
- DThe statement will succeed: the table will be created, and the primary key will also be created.
14Assume there is no table already called PERSONNEL in the database. What will be the result of an attempt to execute the preceding SQL statement?

- AThe statement will fail because you cannot create two primary key constraints on the table.
- BThe statement will successfully create the table and the first primary key but not the second.
- CThe statement will successfully create a single table and one composite primary key consisting of two columns.
- DThe statement will successfully create the table and two primary keys.
15The difference between dropping a column from a table with DROP and setting a column to be UNUSED is:
- AAn UNUSED column can be recovered.
- BThe UNUSED column and its data are retained within the table's storage allocation and counts against the total limit on the number of columns the table is allowed to have.
- CA column that is dropped with DROP no longer appears within the table's description as shown with the DESC or DESCRIBE statement, whereas a column that is set to UNUSED still appears in the table's structure as shown in the output of the DESC statement.
- DNothing.
16The purpose of the CREATE DIRECTORY statement is to create a named object in the database:
- AThat lists names of user accounts that have external privileges
- BThat contains lookup reference material for queries
- CThat identifies the root directory of the Oracle server installation
- DThat points to a directory you choose somewhere within the Oracle server's file system
Information
- Description
- Databases
- Author
- Craig Willey
- Language
- English
- Views
- 70
- Tags
- Rating
- No ratings yet Rate this quiz