295 exam 3

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Which of the following is a valid statement? a.Constraints are rules used to enforce business rules, practices, and policies. b.Constraints prevent errors by not allowing data to be added to tables if the data violates specific rules. c.Constraints ensure the accuracy and integrity of data. d.all of the above

d.all of the above

When the INSERT command is being used to enter data into a non-numeric column, the data must be enclosed in ____.

single quotation marks

​If a new column is added to the PROMOTION table, where will the new column be listed?

​after the MAXRETAIL column (bottom)

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 disable the constraint?

ALTER TABLE orderitems ENABLE CONSTRAINT orderitems_pk;

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

DROP TABLE

A Datatype is a rule used to ensure the accuracy of data stored in a database. _________________________

False

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

False

A constraint is always enforced at the table level.

False

The INSERT command is used to modify existing data in a row.

False

The MODIFY clause is used with the ALTER TABLE command to add a PRIMARY KEY constraint to an existing table.

False

The MODIFY command can be used to change existing data stored in a table.​

False

The VALUES clause of the UPDATE command is used to specify the columns being updated and the new data values. _________________________

False

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

True

The ALTER TABLE command can be used to disable a constraint.​

True

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

True

Which of the following statements about creating constraints is incorrect? a.If you do not provide a name for a constraint, the Oracle 12c server will issue an error message. b.There are two approaches for creating constraints: at the column level or the table level. c.One industry convention is to use the format tablename_columnname_constraint type for the constraint name. d.none of the above

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

Contents of the PUBLISHER table​ If a column named SAL_PCT is to be defined to ensure a value of 100 is input if a NULL value is provided when a new row is inserted, which column definition should be used?​ a.​SAL_PCT DEFAULT ON NULL 100. b.​SAL_PCT DEFAULT 100. c.​SAL_PCT NULL 100 DEFAULT. d.​SAL_PCT ON NULL 100.

a.​SAL_PCT DEFAULT ON NULL 100.

How can constraints be added to a table?

as a part of the CREATE TABLE command as well as the ALTER TABLE command.

When using the ALTER TABLE...DROP COLUMN command, which of the following is not correct?​ a.​The command deletes both the column and its contents. b.​The command can be used to delete multiple columns from a table. c.​You cannot delete the last remaining column in a table. d.​The command's effect on the table is permanent.

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

When data is being entered into a VARCHAR2 or CHAR column using the INSERT command, the data will be stored in ____.​ a.​lower-case characters b.​the default case setting for the table c.​the same case used in the INSERT command d.​upper-case characters

c. ​the same case used in the INSERT command

Contents of the PUBLISHER table​ Based on the contents of the PUBLISHER table, which of the following will add a new record to the table? a.​UPDATE publisher (pubid, name) VALUES (6, 'BOOKS MADE CHEAP'); b.​INSERT INTO publisher VALUES ('BOOKS MADE CHEAP', '800-111-2222'); c.​INSERT INTO publisher (pubid, name) VALUES (6, 'BOOKS MADE CHEAP'); d.​UPDATE publisher VALUES ('BOOKS MADE CHEAP', '800-111-2222');

c.​INSERT INTO publisher (pubid, name) VALUES (6, 'BOOKS MADE CHEAP');

If a constraint applies to more than one column, the constraint must be created at the ____ level.​ a.​database b.​row c.​column d.​table

d.​table

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

datatype

If a new table is being created based upon a subquery, the subquery must be enclosed in which of the following symbols?​

​( )

Based on the contents of the PROMOTION table, which of the following commands will delete only the row for the Free Bookmark from the table?​

​DELETE FROM promotion WHERE gift = 'BOOKMARKER';

A lock arising from a SELECT...FOR UPDATE command will be released when ____.

a COMMIT command is executed


Kaugnay na mga set ng pag-aaral

AP Gov Political Socialization and Public Opinion

View Set

Chapter 2: Anatomy and Physiology

View Set

مكانيكا تقليديه (1) طالبه:عفاف موسى استنتاجات تعاريف معادلات

View Set

Microbiology final exam studyguide

View Set

Psychology: Unit 1- lesson 1: Why does Psychology matter?

View Set

Chapter 32: Skin Integrity and Wound Care

View Set