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

CTE Resource Center - Verso

Virginia’s CTE Resource Center

Create a table.

Definition

Creation should include following these steps:

  • Type the keyword CREATE TABLE [tablename]. Note that the table name cannot be more than 30 characters, start with anything but a letter; the keyword cannot be an SQL keyword and cannot contain any special characters except for the “$” and “_”.
  • Choose the column names and the datatype and length necessary for each column (see the syntax example below).
CREATE TABLE employees(
    employee_id NUMBER(6),
    last_name VARCHAR2(25),
    email VARCHAR2(25),
    salary NUMBER(8,2),
    commission_pct NUMBER(2,2),
    hire_date DATE,
    department_id NUMBER(4),
  • Add other constraints as demanded by the table instance charts to ensure data integrity. Note that examples of constrains are NOT NULL, PRIMARY KEY, UNIQUE KEY, FOREIGN KEY, and CHECK CONSTRAINT. Constraints may be added in the column definitions (called column-level constraints) or after the columns are defined (called table-level). NOT NULL constraints are a type of check constraint and can only be defined at column level. Constraints are needed in order to ensure data integrity.

Related Standards of Learning

Mathematics

COM.14

The student will select and implement appropriate data structures, including arrays (one- and/or two-dimensional) and objects.

Other Related Standards

NBEA Achievement Standards for Information Technology

Enter data and edit fields and records.