· 7 years ago · Oct 20, 2018, 05:46 PM
1DROP TABLE IF EXISTS `departamento`;
2
3CREATE TABLE `departamento` (
4 `departamento_id` int(11) NOT NULL AUTO_INCREMENT,
5 `descripcion` varchar(120) DEFAULT NULL,
6 `pais` int(11) DEFAULT NULL,
7 PRIMARY KEY (`departamento_id`)
8) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
9
10/*Data for the table `departamento` */
11
12insert into `departamento`(`departamento_id`,`descripcion`,`pais`) values (1,'Lima',1),(2,'Arequipa',1);
13
14/*Table structure for table `pais` */
15
16DROP TABLE IF EXISTS `pais`;
17
18CREATE TABLE `pais` (
19 `pais_id` int(11) NOT NULL AUTO_INCREMENT,
20 `pais` tinytext,
21 `fecha_registro` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
22 PRIMARY KEY (`pais_id`)
23) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
24
25/*Data for the table `pais` */
26
27insert into `pais`(`pais_id`,`pais`,`fecha_registro`) values (1,'Peru','2012-08-25 07:46:28'),(2,'Venezuela','2012-08-25 07:46:36');
28
29/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;