SQL Extensions   «Prev  Next»

Lesson 1

Creating Modifying Table Structures (DDL)

This module introduces the SQL commands necessary to create and modify database tables, indexes, and constraints. Here again, Oracle has taken the basic SQL commands and extended them to include parameters specifically tailored for the Oracle database system.

Module objectives

By the end of this module, you will know how to:
  1. Identify the components of the CREATE TABLE command
  2. Describe how tables, tablespaces, and datafiles fit together
  3. Identify the parameters that define storage space
  4. Describe the advantages of using primary key constraints
  5. Identify the syntax components of the foreign key, check, and unique constraints
  6. Change columns in an existing table
  7. Describe the effects of dropping a table and disabling or removing a constraint

First, you will work with the CREATE TABLE command. There are several lessons on this because there is a vast amount of information you need to know about this feature, including not only the columns to be included in the table, but also the amount of physical space to allocate the table, some validation, and even the relationships between the table and other tables.
Next, you will find out how to modify the table's construction once the table has already been created, using the ALTER TABLE command. Finally, you will discover how to remove a table from the database and either remove or disable a relationship that was defined earlier.
The next lesson starts you out on the basics of the CREATE TABLE command.

Constraint: A constraint is a database rule that you define within the database to enforce certain conditions regarding the data that is stored in the database tables.