Ch. 3 Flashcards
________ _____ _______ are commands used to create or modify database tables.
data definition language (DDL)
A ________ is a defined, self-contained structure in Oracle 11g.
database object
Database tables are also considered to be database _______.
objects
What is the command that creates a new table in the database. The user names the columns and identifies the type of data to be stored?
CREATE TABLE
What command creates a table from existing database tables, using the AS clause and subqueries?
CREATE TABLE . . . AS
What command adds a column to a table?
ALTER TABLE . . . ADD
What command changes a column size, datatype, or default value?
ALTER TABLE . . . MODIFY
What command deletes one column from a table?
ALTER TABLE . . . DROP COLUMN
What command marks a column for deletion at a later time?
ALTER TABLE . . . SET UNUSED
OR
SET UNUSED COLUMN
What command completes the deletion of a column previously marked with SET UNUSED?
DROP UNSED COLUMNS
What command changes a table name?
RENAME . . . TO
What command deletes all table rows, but the table name and column structure remain?
TRUNCATE TABLE
What command removes an entire table from the Oracle 11g database?
DROP TABLE
What command permanently deletes a table in the recycle bin?
PURGE TABLE
What command recovers a dropped table if PURGE option not used when table dropped?
FLASHBACK TABLE . . . TO BEFORE DROP