# CTE Resource Center - Verso - Database Design and Management (Oracle) Task 1685818585

CTE Resource Center - Verso

Virginia’s CTE Resource Center

Write code to alter table definitions.

Definition

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 is 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.

Related Standards of Learning

Mathematics

COM.1

The student will design and apply computer programs to solve practical problems in mathematics arising from business and applications in mathematics.

COM.3

The student will write program specifications that define the constraints of a given problem.

Other Related Standards

NBEA Achievement Standards for Information Technology

Enter data and edit fields and records.