Modifying tables

¡Supera tus tareas y exámenes ahora con Quizwiz!

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

False

The MODIFY TABLE command can be used to change the size of a table.

False

The MODIFY clause can be used with the ALTER TABLE command to add a column to an existing table.

False

The SQL command to create a database table is an example of DML.

False

The TRUNCATE TABLE command can be used to delete a table from a database.

False

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

False

Which of the following terms refers to commands that are used to create or modify database tables?

DDL

When adding a column to an existing table, the ____________________ clause must be used with the ALTER TABLE command.

ADD

The ____ TABLE command is used to modify an existing column's data declaration.

ALTER

The ____________________ command can be used to modify the structure of a table

ALTER TABLE

Which of the following keywords is used to remove a database table in Oracle11 g?

DROP TABLE

A database must be shut down before the ALTER TABLE command can be executed.

False

The ____________________ clause of the ALTER TABLE command can be used to change the size of a column.

MODIFY

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

MODIFY

The ____________________ TABLE command can be used to delete and release the storage space of all data contained in a database table, while still retaining the table's structure

TRUNCATE

DDL commands are used to create or modify database objects.

True

Which of the following column data type changes is permitted

VARCHAR2 to CHAR

When a column is deleted, the deletion is permanent.

True

Which command would be used to delete table x and all foreign key constraints to x

drop x cascade constraints

The DROP COLUMN clause of the ALTER TABLE command can be used to drop a maximum of ____________________ column(s) at a time

1

The DROP UNUSED COLUMNS clause can be used with the ____________________ command to delete any column previously set as unused

ALTER TABLE

Which of the following commands can be used to make structural changes to an existing table?

ALTER 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 customers MODIFY (city VARCHAR2(20), lastname VARCHAR2(14));

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

ALTER TABLE customers ADD (firstorderdate DATE);

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

ALTER TABLE...AS

The ____________________ TABLE command can be used to delete a table from a database.

DROP

The ____________________ clause of the ALTER TABLE command can be used to delete a column from an existing table.

DROP COLUMN

DML commands are used to create or modify database tables.

False

Data manipulation language commands are used to create or modify database tables.

False

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

False

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

False

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

False

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

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

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

More than one column can be changed at a time with the ALTER TABLE...MODIFY command.

True

The DROP TABLE command can be used to remove a table and all its data from a database

True

You cannot delete the last column in a table.

True

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

after the MAXRETAIL column

Once a table is ____________________, any associated indexes will be removed from the database

deleted

Which of the following commands will change the name of the LASTNAME column to LAST_NAME in the CUSTOMERS table

none of the above

Adding a new column to a database table is a(n) ____________________ action.

unrestricted

Deleting columns from a table is a(n) ____ action.

unrestricted


Conjuntos de estudio relacionados

Pediatrics: Hematology/oncology questions

View Set

The Formation of the Old Testament

View Set

Business Law II - Chapter 28 Bankruptcy

View Set

Trademarks & Publicity Rights Test

View Set

Chapter 14 - An Introduction to Host Defenses

View Set