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

CTE Resource Center - Verso

Virginia’s CTE Resource Center

Write a table- and column-level constraint.

Definition

Constraints should be created at the time of table creation; syntax should follow these examples:
  • Column-level constraint (demonstrates PRIMARY KEY and NOT NULL at the column level)
CREATE TABLE Employee
(EmpID NUMBER(4) CONSTRAINT Employee_EmpID_PK PRIMARY KEY
EmpLN VARCHAR2(40) CONSTRAINT Employee_EmpLN_NN NOT NULL)
  • Table-level constraint (demonstrates PRIMARY KEY at the table level, with NOT NULL at the column level)
CREATE TABLE Employee
(EmpID NUMBER(4) EmpLN VARCHAR2(40) CONSTRAINT Employee_EmpLN_NN NOT NULL
CONSTRAINT Employee_EmpID_PK PRIMARY KEY(EmpID))

Related Standards of Learning

Mathematics

COM.3

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