CREATE TABLE ALUMNOS_INGRESANTES (
    NRO_ALUMNO              INTEGER NOT NULL,
    NOMBRE                  VARCHAR(100) CHARACTER SET ISO8859_1 NOT NULL,
    FECHA_NACIMIENTO        DATE,
    DIRECCION               VARCHAR(200) CHARACTER SET ISO8859_1,
    TELEFONO                VARCHAR(300) CHARACTER SET ISO8859_1,
    EMAIL                   VARCHAR(300) CHARACTER SET ISO8859_1,
    DOCUMENTO               VARCHAR(15) CHARACTER SET ISO8859_1 NOT NULL,
    OBSERVACION             VARCHAR(500) CHARACTER SET ISO8859_1,
    NRO_CARRERA             INTEGER,
    CURSO                   INTEGER,
    CLAVE                   VARCHAR(300) CHARACTER SET ISO8859_1
);

-----
CREATE TRIGGER ALUMNOS_INGRESANTES_BI FOR ALUMNOS_INGRESANTES
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
  IF (NEW.NRO_ALUMNO IS NULL) THEN BEGIN
    NEW.NRO_ALUMNO = GEN_ID(ORDEN_GEN, 1);
  END
END