2. Creating a Database : How You Create a Database Using Ingres Commands : Create a Table Using the CREATE TABLE Statement
 
Share this page                  
Create a Table Using the CREATE TABLE Statement
The CREATE TABLE statement creates a new base table that is owned by the user issuing the statement. The CREATE TABLE statement creates entries in the system catalogs for the table created.
You can create tables using any of these methods:
Tool
Command
See
Ingres Terminal Monitor (line-based)
sql
SQL Reference Guide
Ingres Interactive Terminal Monitor (forms-based)
isql
Character-based Querying and Reporting Tools User Guide
Ingres Tables utility
tables
Character-based Querying and Reporting Tools User Guide
Ingres Applications-By-Forms and Ingres 4GL (referred to as ABF/4GL)
abf
Forms-based Application Development Tools User Guide
An Embedded SQL program
 
Embedded SQL Companion Guide
For a complete description of the CREATE TABLE statement, refer to the SQL Reference Guide.
To create the airport table using the CREATE TABLE statement
The following statement creates the airport table with columns ap_id, ap_iatacode, ap_place, ap_name, and ap_ccode:
CREATE TABLE airport(
       ap_id integer not null not default,
       ap_iatacode nchar(3) not null not default,
       ap_place nvarchar(30),
       ap_name nvarchar(50),
       ap_ccode nchar(2)
);