

CREATE TABLE MATERIAS (
    NRO_MATERIA           INTEGER NOT NULL,
    NRO_PLAN      INTEGER,
    CURSO         INTEGER,
    EXPLAN        INTEGER,
    NOTA          VARCHAR(500) CHARACTER SET ISO8859_1 COLLATE ES_ES,
    ANALITICO     BOOLEAN NOT NULL /* BOOLEAN = SMALLINT DEFAULT 0 NOT NULL CHECK (VALUE BETWEEN -1 and 0) */,
    OBLIGATORIA   BOOLEAN NOT NULL /* BOOLEAN = SMALLINT DEFAULT 0 NOT NULL CHECK (VALUE BETWEEN -1 and 0) */,
    ACTIVA        BOOLEAN NOT NULL /* BOOLEAN = SMALLINT DEFAULT 0 NOT NULL CHECK (VALUE BETWEEN -1 and 0) */,
    NOTA_AUX      VARCHAR(500) CHARACTER SET ISO8859_1 COLLATE ES_ES,
    NOMBRE        VARCHAR(100) CHARACTER SET ISO8859_1 COLLATE ES_ES,
    NOMBRE_LARGO  VARCHAR(100) CHARACTER SET ISO8859_1 COLLATE ES_ES
);


-----

ALTER TABLE MATERIAS ADD CONSTRAINT PK_MATERIAS PRIMARY KEY (NRO_MATERIA);

