Question 1 Which of the following is a valid column name VAR

Question 1

Which of the following is a valid column name?

VARCHAR2

DISTINCT

NEW_COLUMN

CHAR

Question 2

Which of the following rules apply to table names in Oracle 12c?

Names can contain blank spaces.

Names can be up to 225 characters in length.

Names can begin with a number.

Names can contain a number sign (#).

Question 3

A(n) ____ simply identifies the type of data that Oracle 12c will be expected to store in a column.

data definition

data format

datatype

data record

Question 4

When defining columns for a table, which of the following symbols is used to separate the column names in the column list?

\" \"

,

( )

| |

Question 5

Which of the following is a valid SQL statement?

Question 6

Which of the following keywords uses a subquery to create a new table using existing database tables?

ALTER TABLE

GENERATE TABLE

CREATE TABLE...AS

CREATE TABLE...FROM

Question 7

Which of the following keywords cannot be used to modify an existing table?

ALTER TABLE...ADD

ALTER TABLE...DROP COLUMN

ALTER TABLE...MODIFY

ALTER TABLE...AS

Question 8

Which of the following keywords can be used to change the size, datatype, and/or default value of an existing column?

ADD

MODIFY

CHANGE

RESET

Question 9

When using the ALTER TABLE...DROP COLUMN command, which of the following is not correct?

The command\'s effect on the table is permanent.

You cannot delete the last remaining column in a table.

The command deletes both the column and its contents.

The command can be used to delete multiple columns from a table.

Question 10

Which command is used to rename a table you own?

ALTER TABLE...RENAME

ALTER TABLE...SET NAME

RENAME...AS

RENAME...TO

Question 11

Which of the following statements about a PRIMARY KEY is incorrect?

It identifies which column(s) uniquely identify each record.

It can be NULL, as long as the FOREIGN KEY contains a value.

Each data value must be unique.

none of the above

Question 12

The UNIQUE constraint differs from the PRIMARY KEY constraint in what way?

The UNIQUE constraint does not allow NULL values.

The UNIQUE constraint can be created at either the column level or the table level.

The UNIQUE constraint allows NULL values.

The UNIQUE constraint ensures that a specific condition is true before a data value is added to a table.

Question 13

Which of the following statements about creating constraints is incorrect?

If you do not provide a name for a constraint, the Oracle 12c server will issue an error message.

There are two approaches for creating constraints: at the column level or the table level.

One industry convention is to use the format tablename_columnname_constraint type for the constraint name.

none of the above

Question 14

Which of the following keywords is used to remove a database table in Oracle 12c?

DROP TABLE

ALTER TABLE...DROP

DELETE TABLE

TRUNCATE TABLE

Question 15

When a constraint is created at the ____ level with the CREATE TABLE command, the constraint definition is simply included as part of the column definition.

table

column

database

row

Question 16

Which of the following is the standard abbreviation for the constraint NOT NULL?

nn

nl

nv

nnv

Question 17

If the ____ keyword is included when a constraint is created, a constraint name must be provided by the user.

CONST

CONSTRAIN

CONSTRAINT

none of the above

Question 18

If a constraint applies to more than one column, the constraint must be created at the ____ level.

column

table

row

database

Question 19

Which of the following is a valid statement?

Question 20

To use a sequence in an INSERT statement, you

use the NEXTVAL pseudo column for the sequence in the VALUES list for a row

use the CURRVAL + 1 expression for the sequence in the VALUES list for a row

code the sequence name in the VALUES list for a row

code the sequence name + 1 in the VALUES list for a row

Question 21

Structure of the ORDERITEMS table

If the constraints on the ORDERID and ITEMID columns of the ORDERITEMS table were created as a PRIMARY constraint, and the actual constraint name is not known, which of the following commands can be used to delete the constraint?

Question 22

Structure of the CUSTOMERS table

Which of the following commands will add a new column named FIRST ORDER DATE to the CUSTOMERS table to store the date that the customer first placed an order with the company?

ALTER TABLE customers ADD (firstorderdate DATE);

Question 23

Structure of the ORDERITEMS table

If a PRIMARY KEY constraint, named ORDERITEMS_PK, exists for the ORDER# and ITEM# columns of the ORDERITEMS table, which of the following commands will drop the constraint?

Question 24

Structure of the ORDERITEMS table

If a PRIMARY KEY constraint, named ORDERITEMS_PK, for the ORDER# and ITEM# columns of the ORDERITEMS table have been disabled, which of the following commands will enable the constraint?

Question 25

Structure of the CUSTOMERS table

Which of the following commands will change the name of the LAST NAME column to LAST_NAME in the CUSTOMERS table?

none of the above

Question 26

A PRIMARY KEY constraint can be added to an existing table by using the ____ clause of the ALTER TABLE command.

MODIFY

ADD

CONSTRAINT

none of the above

Question 27

Which keywords identify a column that, if it contains a value, it must match data contained in another table?

FOREIGN KEY

PRIMARY KEY

CHECK

UNIQUE

Question 28

Which of the following keywords must have been included during the creation of a FOREIGN KEY constraint to allow a row from the parent table to be deleted, even if it is referenced by a row in the child table?

CASCADE

AUTO REMOVE

ON DELETE CASCADE

none of the above

Question 29

The purpose of the ____ constraint is to ensure that two records do not have the same value stored in the same column. However, it can contain NULL values.

PRIMARY KEY

UNIQUE

CHECK

FOREIGN KEY

Question 30

The ____ constraint requires that a specific condition be met before a record can be added to a table.

UNIQUE

REFERENCE

CONDITION

CHECK

Question 31

Which of the following constraints cannot be added to an existing table with the ADD clause of the ALTER TABLE command?

CHECK

UNIQUE

NOT NULL

none of the above

Flag this Question

Question 321 pts

When you define a foreign key constraint, you can determine all but one of the following. Which one is it?

that no action should be taken and an error should be returned when referential integrity is going to be violated

that the deletion of a row in a primary key table should be cascaded down to related rows in the foreign key table

that the deletion of a row in a primary key table should cause the foreign keys in related rows in the foreign key table to be set to nulls

that the insertion of a row in a foreign key table that has a foreign key that isn’t matched in the primary key table should be cascaded up to the primary key table

Flag this Question

Question 331 pts

A database object is a defined, self-contained structure in Oracle 12c.

Flag this Question

Question 341 pts

If the CREATE TABLE is being used to create a table from existing data, the SUBQUERY keyword must be used.

Flag this Question

Question 351 pts

Only one column can be added to an existing table at one time.

Flag this Question

Question 361 pts

The ALTER TABLE name can be used to rename a table.

Flag this Question

Question 371 pts

To retain the structure of a table, while deleting all its data and releasing their storage space, execute the TRUNC command.

Flag this Question

Question 381 pts

The DELETE TABLE command can be used to remove a table from a database.

Flag this Question

Question 390.5 pts

The CHANGE TABLE command can be used to modify an existing table.

Flag this Question

Question 400.5 pts

The MODIFY clause can be included in the ALTER TABLE command to add a default value to an existing column.

Flag this Question

Question 410.5 pts

The DELETE TABLE command can be used to delete all the data stored in a table and release the storage space, yet retain the structure of the table.

Flag this Question

Question 420.5 pts

The data contained in a dropped table can be retrieved if the DROP option was not used in the DROP TABLE command.

Flag this Question

Question 430.5 pts

A constraint can only be created as part of the CREATE TABLE command.

Flag this Question

Question 440.5 pts

A constraint for a composite primary key must be created at the table level.

Flag this Question

Question 450.5 pts

A constraint is always enforced at the table level.

Flag this Question

Question 460.5 pts

A PRIMARY KEY constraint will make certain the column designated as the primary key does not contain a NULL value.

Flag this Question

Question 470.5 pts

Only one PRIMARY KEY constraint can exist for each table.

Flag this Question

Question 480.5 pts

If a FOREIGN KEY constraint exists, then a record cannot be deleted from the parent table if that row is referenced by an entry in the child table.

Flag this Question

Question 491 pts

A(n) UNIQUE constraint will allow NULL values to be stored in the designated column. _________________________

Flag this Question

Question 500.5 pts

A(n) NOT NULL constraint is a special CHECK constraint with the condition of IS NOT NULL. _________________________

Flag this Question

Question 510.5 pts

Both the table-level and column-level approaches to creating a constraint can be included in the same command.

Flag this Question

Question 525 pts

The following tables form part of a database held in a relational DBMS:-

Where:

Hotel contains hotel details and hotelNo is the primary key;

Room includes room details for each hotel and (roomNo, hotelNo) forms the primary key;

For each relation, the primary key must not contain any nulls.

A room is related to Hotel through the attribute hotelNo. Therefore, the hotelNo in Room should contain the number of an existing hotel in the Hotel relation. It would probably be unacceptable to have a hotelNo in Room with a null value.

Create the Hotel table.

Create the Room table.

VARCHAR2

Solution

Question 1
Which of the following is a valid column name?

sol: NEW_COLUMN


Question 2
Which of the following rules apply to table names in Oracle 12c?
sol:
   
Names can contain a number sign (#).

Question 3
A(n) ____ simply identifies the type of data that Oracle 12c will be expected to store in a column.

sol:   
datatype

Question 4
When defining columns for a table, which of the following symbols is used to separate the column names in the column list?
sol: , (comma)

Question 5
Which of the following is a valid SQL statement?
   
sol:CREATE TABLE newname (colA NUMBER, colB DATE);

Question 6
Which of the following keywords uses a subquery to create a new table using existing database tables?
sol:CREATE TABLE...AS

Question 7
Which of the following keywords cannot be used to modify an existing table?
sol:ALTER TABLE...AS

Question 8
Which of the following keywords can be used to change the size, datatype, and/or default value of an existing column?
sol: MODIFY

Question 1 Which of the following is a valid column name? VARCHAR2 DISTINCT NEW_COLUMN CHAR Question 2 Which of the following rules apply to table names in Orac
Question 1 Which of the following is a valid column name? VARCHAR2 DISTINCT NEW_COLUMN CHAR Question 2 Which of the following rules apply to table names in Orac
Question 1 Which of the following is a valid column name? VARCHAR2 DISTINCT NEW_COLUMN CHAR Question 2 Which of the following rules apply to table names in Orac
Question 1 Which of the following is a valid column name? VARCHAR2 DISTINCT NEW_COLUMN CHAR Question 2 Which of the following rules apply to table names in Orac
Question 1 Which of the following is a valid column name? VARCHAR2 DISTINCT NEW_COLUMN CHAR Question 2 Which of the following rules apply to table names in Orac
Question 1 Which of the following is a valid column name? VARCHAR2 DISTINCT NEW_COLUMN CHAR Question 2 Which of the following rules apply to table names in Orac
Question 1 Which of the following is a valid column name? VARCHAR2 DISTINCT NEW_COLUMN CHAR Question 2 Which of the following rules apply to table names in Orac
Question 1 Which of the following is a valid column name? VARCHAR2 DISTINCT NEW_COLUMN CHAR Question 2 Which of the following rules apply to table names in Orac
Question 1 Which of the following is a valid column name? VARCHAR2 DISTINCT NEW_COLUMN CHAR Question 2 Which of the following rules apply to table names in Orac

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site