Title: Write code to alter table definitions.
Course: Database Design and Management (Oracle) (10052) > Section: Modifying and Managing Tables

Writing code should include using the alteration of a previously created table and using syntax such as the following:

ALTER TABLE     employees
ADD CONSTRAINT  emp_manager_fk
FOREIGN KEY(manager_id)
REFERENCES employees(employee_id);

The ALTER TABLE command is a DDL command, which means that it is automatically committed to the database when issued. Guidelines for altering the structure of a table are as follows:

- Add, drop, enable, or disable a constraint without the ability to modify its structure.
- Add a NOT NULL constraint to an existing column by using the MODIFY clause of the ALTER TABLE statement.
- Define a NOT NULL column only if the table is empty or if the column has a value for every row.