ITC 295 Exam 3

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

The column to be updated by the UPDATE command is specified in the ____ clause.

SET

If a data value violates a(n) constraint, the entire row is prevented from being added to the table.

TRUE

SELECT9 is a valid table name.

TRUE

The SET clause of the UPDATE command is used to identify the column(s) being updated.

TRUE

When a subquery is used in the INSERT command, the subquery does not have to be enclosed in parentheses.

TRUE

When creating a table, which of the following statements is correct?

The column list must be enclosed in parentheses ( ).

A CHECK constraint requires that a data value meet a certain condition before the record is added to the database table

True

A FOREIGN KEY constraint will not allow a row containing a NULL value in the foreign key column to be added to the table.

True

A(n) FOREIGN KEY constraint can only reference a column in the parent table that has been designated as the primary key for that table.

True

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

Which of the following commands is used to modify existing data in a table?

UPDATE

Contents of the PROMOTION table​ ​ Based on the contents of the PROMOTION table, which of the following will correctly change the value assigned to the MAXRETAIL column for Free Shipping to 75.00?

UPDATE promotion SET maxretail = 75 WHERE gift = 'FREE SHIPPING';

Which of the following datatypes refers to variable-length character data, where n represents the maximum length of the column?

VARCHAR2(n)

The row(s) to be updated by the UPDATE command is specified by the ____ clause.

WHERE

​Which of the following statements about creating constraints is incorrect?

When you create constraints at the column level, the constraint being created applies to the column specified XX

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.

column

The NOT NULL constraint can only be created at the ____ level.

column or 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

When data is being entered into a VARCHAR2 or CHAR column using the INSERT command, the data will be stored in ____.

the same case used in the INSERT command

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

( )

The maximum width of the NUMBER datatype is ____ digits.

38

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

ADD

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);

Structure of the CUSTOMERS table ​ Which of the following commands will increase the size of the CITY column in the CUSTOMERS table from 12 to 20 and increase size of the LASTNAME column from 10 to 14?

ALTER TABLE customersMODIFY (city VARCHAR2(20), lastname VARCHAR2(14));

Which of the following commands will delete only publisher 4 from the PUBLISHER table?

​DELETE FROM publisher WHERE pubid = 4;

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

​FOREIGN KEY

To delete all the rows in a table and free up the storage space that was occupied by those rows, the ____ command should be used.

​TRUNCATE TABLE

Which of the following statements about the FOREIGN KEY constraint is incorrect?

​The constraint can reference any column in another table, even a column that has not been designated as the primary key for the referenced 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 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?

ALTER TABLE orderitems ENABLE CONSTRAINT orderitems_pk;

Structure of the ORDERITEMS table Based on the structure of the ORDERITEMS table, which of the following commands will make certain that the ISBN entered actually exists in the ISBN column of the BOOKS table?

ALTER TABLE orderitemsADD FOREIGN KEY (isbn) REFERENCES books(isbn);

Structure of the PROMOTION table Which of the following commands will add a UNIQUE constraint to the MINRETAIL column of the PROMOTION table?

ALTER TABLE promotion ADD CONSTRAINT orderitems_minretail_uk UNIQUE (minretail);

Which of the following commands will add a UNIQUE constraint to the MINRETAIL column of the PROMOTION table?

ALTER TABLE promotion ADD CONSTRAINT orderitems_minretail_uk UNIQUE (minretail);

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

CHECK

Which command instructs Oracle 12c to create a new table?

CREATE TABLE

Which command instructs Oracle 12c to create a new table from existing data?

CREATE TABLE AS

Which of the following rules does not apply to column names in Oracle 12c?

Column names can contain an ampersand (&).

Which of the following is displayed by the DESCRIBE command?

Column names, not null requirements, and datatypes

Which clause will allow you to disable a constraint?

DISABLE

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

FALSE

A column name can consist of up to 225 characters.

False

The default size of a VARCHAR2 column is one character.

False

Contents of the PROMOTION table​ ​ Which of the following SQL statements will insert a new row into the PROMOTION table?

INSERT INTO promotion (gift, minretail, maxretail) VALUES ('FREE BOOK', 75.01, 89.99);

Which of the following is a valid column name?

NEW_COLUMN

The ____ constraint prevents the user from adding a NULL value in the specified column.

NOT NULL

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

after the MAXRETAIL column


Kaugnay na mga set ng pag-aaral

Chapter 7 and 8 review questions

View Set

Chapter 17 Antitrust Misrepresentation

View Set

Chapter 7 Geography Test, Mexico Textbook Reading (Part 1)

View Set