Quadcap Software

Quadcap Embeddable Database

Quadcap Software

Syntax

createTableStmt
  :  "create" 
    (  "global" 
    |  "local" 
    |  
    ) 
    (  "temporary" 
    |  
    ) 
    "table" sqlId LPAREN 
    (  columnDefinition 
    |  tableConstraint 
    |  
    ) 
    ( COMMA 
      (  columnDefinition 
      |  tableConstraint 
      ) )* RPAREN 
  ;


CREATE TABLE statement

This statement is used to create a permanent or temporary table in the current schema.

Examples

CREATE TABLE TEMP_OBSERV (
YEAR_OBSERV  NUMERIC(4),
CITY         CHAR(10),
MAX_TEMP     NUMERIC(5,2),
MIN_TEMP     NUMERIC(5,2)
);
CREATE TABLE STAFF (
EMPNUM   CHAR(3) NOT NULL UNIQUE,
EMPNAME  CHAR(20),
GRADE    DECIMAL(4),
CITY     CHAR(15)
);

Implementation Notes

  • Even though the grammar allows the specification of LOCAL TEMPORARY tables, all temporary tables are, in fact created as GLOBAL.
  • Database Recovery may not properly dispose of temporary tables created by transactions which were active when the database went down.