· 9 years ago · Oct 03, 2016, 12:22 AM
1CREATE TABLE IF NOT EXISTS `alertas` (
2 `id` int(9) NOT NULL AUTO_INCREMENT COMMENT 'Es la cantidad de alertas que se han realizado',
3 `tipo` varchar(20) NOT NULL COMMENT 'Registra el tipo de alerta',
4 `obs` varchar(20) NOT NULL COMMENT 'Registra una observación sobre la alerta',
5 `fecha` varchar(20) NOT NULL COMMENT 'Registra la fecha',
6 PRIMARY KEY (`tipo`)
7) ENGINE=InnoDB DEFAULT CHARSET=latin1;
8
9CREATE TABLE IF NOT EXISTS `tipoalertas` (
10 `id` int(9) NOT NULL AUTO_INCREMENT COMMENT 'Es la cantidad de alertas que se han realizado',
11 `tipo` varchar(20) NOT NULL COMMENT 'Registra el tipo de alerta',
12 PRIMARY KEY (`tipo`)
13) ENGINE=InnoDB DEFAULT CHARSET=latin1;
14
15INSERT into `tipoalertas` (`rut`, `nombre`) VALUES (1, `Accidente`);
16INSERT into `tipoalertas` (`rut`, `nombre`) VALUES (2, `Atraso`);
17INSERT into `tipoalertas` (`rut`, `nombre`) VALUES (3, `Otros);