ISM Chapter 4

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

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

ADD

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?​

ALTER TABLE orderitems DROP PRIMARY KEY;

Structure of the PROMOTION table Based on the structure of the PROMOTION table, which of the following commands will ensure that the value entered for the MINRETAIL column is less than the value entered for the MAXRETAIL column?

ALTER TABLE promotion ADD CHECK ( minretail < maxretail);

Structure of the PROMOTION table Based on the structure of the PROMOTION table, which of the following commands will add a PRIMARY KEY constraint to the GIFT column?

ALTER TABLE promotion ADD PRIMARY KEY(gift);

Structure of the ORDERITEMS table Based on the structure of the ORDERITEMS table, which of the following commands was most likely to create a table?

CREATE TABLE orderitems (order# NUMBER (4), item# NUMBER(2), isbn VARCHAR2(10), qty NUMBER(3), PRIMARY KEY(order#, item#));

Only one ___ constraint can exist for each table

PRIMARY KEY

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

UNIQUE

How can constraints be added to a table?

both a and b as part of the CREATE TABLE command as part of the ALTER TABLE command

The NOT NULL constraint can only be created at the ___ level

column

Where doe the Oracle 12c serve store information about objects in the database, including information about constraints?

in the data dictionary

Structure of the ORDERITEMS table Based on the structure of the ORDERITEMS table, which of the following commands will add a NOT NULL constraint to the ISBN column?​

none of the above

Constraints are always enforced at the ____ level

row

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

CONSTRAINT

Which clause will allow you to delete a constraint?

DROP

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

The UNIQUE constraint allows NULL values


Ensembles d'études connexes

Lesson 5: Summarizing Basic Cryptographic Concepts

View Set

Post-class Multiple Choice Chp. 4

View Set