/******************************************************************************/
/***               Generated by IBExpert 26/05/2020 11:18:48                ***/
/******************************************************************************/

/******************************************************************************/
/***      Following SET SQL DIALECT is just for the Database Comparer       ***/
/******************************************************************************/
SET SQL DIALECT 3;

CREATE GENERATOR PQ_AVALIACAOFISICA;

/******************************************************************************/
/***                                 Tables                                 ***/
/******************************************************************************/



CREATE TABLE AVALIACAOFISICA (
    ID          INTEGER NOT NULL,
    CODCLI INTEGER,
    DATA DATE,
    IDADE VARCHAR(100),
    ALUNO VARCHAR(30),
    VO2MAX VARCHAR(100),
    PESO NUMERIC(14,4),
    ABDOMEN NUMERIC(14,4),
    DENSIDADECORP NUMERIC(14,4),
    MASSALIVRE NUMERIC(14,4)
);




/******************************************************************************/
/***                              Primary Keys                              ***/
/******************************************************************************/

ALTER TABLE AVALIACAOFISICA ADD CONSTRAINT PK_AVALIACAOFISICA PRIMARY KEY (ID);


/******************************************************************************/
/***                                Triggers                                ***/
/******************************************************************************/


SET TERM ^ ;



/******************************************************************************/
/***                          Triggers for tables                           ***/
/******************************************************************************/



/* Trigger: INSMOVIMENTOPLANO */
CREATE OR ALTER TRIGGER INSAVALIACAOFISICA FOR AVALIACAOFISICA
ACTIVE BEFORE INSERT POSITION 0
as 
begin 
   new.ID=gen_id(PQ_AVALIACAOFISICA,1);
end
^


SET TERM ; ^



/******************************************************************************/
/***                               Privileges                               ***/
/******************************************************************************/




