Relational tables: Using the Oracle-supplied datatypes you can create tables to store the rows inserted and manipulated by your applications.
Tables have column definitions, and you can add or drop columns as the application requirements change. Tables are created via the create table command
Here is the create table command for the NEWSPAPER table:
create table NEWSPAPER (
Feature VARCHAR2(15) not null,
Section CHAR(1),
Page NUMBER
);
you can read it as:
Create a table called NEWSPAPER.
It will have three columns,
- named Feature (a varying-length character column),
- Section (a fixed-length character column), and
- Page (a numeric column).
The values in the Feature column can be up to 15 characters long, and every row must have a value for Feature.
Section values will all be 1 character long. In later modules you will see how to extend this simple command to add constraints, indexes, and storage clauses.
For now, the NEWSPAPER table will be kept simple so that the examples can focus on SQL.