Posted By

nicolaspar on 07/20/06


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

rickyslow


Sql - Datos - Regiones y Comunas de chile


 / Published in: SQL
 

  1. /*
  2.   Regiones y comunas de chile.
  3.   Power by Nicolás Pardo
  4.   Add new regions: cristian.blindesign.com
  5. */
  6.  
  7.  
  8. --
  9. -- Definition of table `REGIONES`
  10. --
  11.  
  12. CREATE TABLE `regiones` (
  13. `codigo` int(11) NOT NULL,
  14. `nombre` char(255) DEFAULT NULL,
  15. `orden` int(11) NOT NULL,
  16. `activo` int(11) DEFAULT NULL
  17. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  18.  
  19. --
  20. -- Dumping data for table `REGIONES`
  21. --
  22.  
  23. /*!40000 ALTER TABLE `REGIONES` DISABLE KEYS */;
  24. LOCK TABLES `regiones` WRITE;
  25. INSERT INTO `regiones` VALUES (14,'Región de Los Ríos',0,1),
  26. (13,'Región Metropolitana',0,1),
  27. (12,'Región de Magallanes y la Antártica Chilena',0,1),
  28. (11,'Región de Aysén del General Carlos Ibáñez del Campo',0,1),
  29. (10,'Región de Los Lagos',0,1),
  30. (9,'Región de la Araucanía',0,1),
  31. (8,'Región del Bío-Bío',0,1),
  32. (7,'Región del Maule',0,1),
  33. (6,'Región del Libertador General Bernardo O Higgins',0,1),
  34. (5,'Región de Valparaiso',0,1),
  35. (4,'Región de Coquimbo',0,1),
  36. (3,'Región de Atacama',0,1),
  37. (2,'Región de Antofagasta',0,1),
  38. (1,'Región de Tarapacá',0,1),
  39. (15,'Región de Arica y Parinacota',0,1);
  40. UNLOCK TABLES;
  41. /*!40000 ALTER TABLE `REGIONES` ENABLE KEYS */;
  42.  
  43. --
  44. -- Definition of table `comunas`
  45. --
  46. CREATE TABLE `comunas` (
  47. `codigoInterno` int(11) UNSIGNED NOT NULL DEFAULT '0',
  48. `nombre` varchar(255) DEFAULT NULL,
  49. `padre` int(11) UNSIGNED NOT NULL DEFAULT '0',
  50. PRIMARY KEY (`codigoInterno`)
  51. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  52.  
  53. --
  54. -- Dumping data for table `comunas`
  55. --
  56.  
  57. /*!40000 ALTER TABLE `comunas` DISABLE KEYS */;
  58. LOCK TABLES `comunas` WRITE;
  59. INSERT INTO `comunas` VALUES (346,'ALTO HOSPICIO',1),
  60. (296,'CAMINA',1),
  61. (297,'COLCHANE',1),
  62. (3,'HUARA',1),
  63. (2,'IQUIQUE',1),
  64. (4,'PICA',1),
  65. (5,'POZO ALMONTE',1),
  66. (7,'ANTOFAGASTA',2),
  67. (10,'CALAMA',2),
  68. (298,'MARIA ELENA',2),
  69. (8,'MEJILLONES',2),
  70. (300,'OLLAGÜE',2),
  71. (301,'SAN PEDRO DE ATACAMA',2),
  72. (299,'SIERRA GORDA',2),
  73. (9,'TALTAL',2),
  74. (6,'TOCOPILLA',2),
  75. (302,'ALTO DEL CARMEN',3),
  76. (14,'CALDERA',3),
  77. (11,'CHAÑARAL',3),
  78. (13,'COPIAPO',3),
  79. (12,'DIEGO DE ALMAGRO',3),
  80. (17,'FREIRINA',3),
  81. (18,'HUASCO',3),
  82. (15,'TIERRA AMARILLA',3),
  83. (16,'VALLENAR',3),
  84. (22,'ANDACOLLO',4),
  85. (31,'CANELA',4),
  86. (29,'COMBARBALA',4),
  87. (21,'COQUIMBO',4),
  88. (30,'ILLAPEL',4),
  89. (20,'LA HIGUERA',4),
  90. (19,'LA SERENA',4),
  91. (33,'LOS VILOS',4),
  92. (26,'MONTE PATRIA',4),
  93. (25,'OVALLE',4),
  94. (24,'PAIHUANO',4),
  95. (27,'PUNITAQUI',4),
  96. (28,'RIO HURTADO',4),
  97. (32,'SALAMANCA',4),
  98. (23,'VICUÑA',4),
  99. (44,'ALGARROBO',5),
  100. (56,'CABILDO',5),
  101. (67,'CALLE LARGA',5),
  102. (46,'CARTAGENA',5),
  103. (40,'CASABLANCA',5),
  104. (63,'CATEMU',5),
  105. (340,'CONCON',5);
  106. INSERT INTO `comunas` VALUES (45,'EL QUISCO',5),
  107. (47,'EL TABO',5),
  108. (51,'HIJUELAS',5),
  109. (41,'ISLA DE PASCUA',5),
  110. (321,'JUAN FERNANDEZ',5),
  111. (50,'LA CALERA',5),
  112. (49,'LA CRUZ',5),
  113. (59,'LA LIGUA',5),
  114. (53,'LIMACHE',5),
  115. (65,'LLAY LLAY',5),
  116. (66,'LOS ANDES',5),
  117. (52,'NOGALES',5),
  118. (54,'OLMUE',5),
  119. (62,'PANQUEHUE',5),
  120. (57,'PAPUDO',5),
  121. (55,'PETORCA',5),
  122. (36,'PUCHUNCAVI',5),
  123. (61,'PUTAENDO',5),
  124. (48,'QUILLOTA',5),
  125. (38,'QUILPUE',5),
  126. (35,'QUINTERO',5),
  127. (68,'RINCONADA',5),
  128. (42,'SAN ANTONIO',5),
  129. (69,'SAN ESTEBAN',5),
  130. (60,'SAN FELIPE',5),
  131. (64,'SANTA MARIA',5),
  132. (43,'SANTO DOMINGO',5),
  133. (34,'VALPARAISO',5),
  134. (39,'VILLA ALEMANA',5),
  135. (37,'VIÑA DEL MAR',5),
  136. (58,'ZAPALLAR',5),
  137. (132,'CHEPICA',6),
  138. (125,'CHIMBARONGO',6),
  139. (110,'CODEGUA',6),
  140. (114,'COINCO',6),
  141. (113,'COLTAUCO',6),
  142. (112,'DOÑIHUE',6),
  143. (107,'GRANEROS',6),
  144. (139,'LA ESTRELLA',6),
  145. (116,'LAS CABRAS',6),
  146. (136,'LITUECHE',6),
  147. (129,'LOLOL',6),
  148. (106,'MACHALI',6),
  149. (122,'MALLOA',6),
  150. (134,'MARCHIGUE',6),
  151. (126,'NANCAGUA',6),
  152. (138,'NAVIDAD',6);
  153. INSERT INTO `comunas` VALUES (120,'OLIVAR',6),
  154. (130,'PALMILLA',6),
  155. (133,'PAREDONES',6),
  156. (131,'PERALILLO',6),
  157. (115,'PEUMO',6),
  158. (118,'PICHIDEGUA',6),
  159. (137,'PICHILEMU',6),
  160. (127,'PLACILLA',6),
  161. (135,'PUMANQUE',6),
  162. (123,'QUINTA DE TILCOCO',6),
  163. (105,'RANCAGUA',6),
  164. (121,'RENGO',6),
  165. (119,'REQUINOA',6),
  166. (124,'SAN FERNANDO',6),
  167. (111,'SAN FRANCISCO DE MOSTAZAL',6),
  168. (117,'SAN VICENTE',6),
  169. (128,'SANTA CRUZ',6),
  170. (166,'CAUQUENES',7),
  171. (167,'CHANCO',7),
  172. (161,'COLBUN',7),
  173. (157,'CONSTITUCION',7),
  174. (155,'CUREPTO',7),
  175. (140,'CURICO',7),
  176. (158,'EMPEDRADO',7),
  177. (144,'HUALAÑE',7),
  178. (145,'LICANTEN',7),
  179. (159,'LINARES',7),
  180. (162,'LONGAVI',7),
  181. (154,'MAULE',7),
  182. (147,'MOLINA',7),
  183. (164,'PARRAL',7),
  184. (152,'PELARCO',7),
  185. (320,'PELLUHUE',7),
  186. (153,'PENCAHUE',7),
  187. (143,'RAUCO',7),
  188. (165,'RETIRO',7),
  189. (149,'RIO CLARO',7),
  190. (141,'ROMERAL',7),
  191. (148,'SAGRADA FAMILIA',7),
  192. (151,'SAN CLEMENTE',7),
  193. (156,'SAN JAVIER',7),
  194. (341,'SAN RAFAEL',7),
  195. (150,'TALCA',7),
  196. (142,'TENO',7),
  197. (146,'VICHUQUEN',7),
  198. (163,'VILLA ALEGRE',7);
  199. INSERT INTO `comunas` VALUES (160,'YERBAS BUENAS',7),
  200. (303,'ANTUCO',8),
  201. (198,'ARAUCO',8),
  202. (180,'BULNES',8),
  203. (208,'CABRERO',8),
  204. (201,'CAÑETE',8),
  205. (344,'CHIGUAYANTE',8),
  206. (168,'CHILLAN',8),
  207. (342,'CHILLAN VIEJO',8),
  208. (175,'COBQUECURA',8),
  209. (186,'COELEMU',8),
  210. (170,'COIHUECO',8),
  211. (188,'CONCEPCION',8),
  212. (202,'CONTULMO',8),
  213. (194,'CORONEL',8),
  214. (197,'CURANILAHUE',8),
  215. (185,'EL CARMEN',8),
  216. (193,'FLORIDA',8),
  217. (192,'HUALQUI',8),
  218. (210,'LAJA',8),
  219. (199,'LEBU',8),
  220. (200,'LOS ALAMOS',8),
  221. (204,'LOS ANGELES',8),
  222. (195,'LOTA',8),
  223. (214,'MULCHEN',8),
  224. (212,'NACIMIENTO',8),
  225. (213,'NEGRETE',8),
  226. (174,'NINHUE',8),
  227. (184,'PEMUCO',8),
  228. (191,'PENCO',8),
  229. (169,'PINTO',8),
  230. (171,'PORTEZUELO',8),
  231. (215,'QUILACO',8),
  232. (206,'QUILLECO',8),
  233. (182,'QUILLON',8),
  234. (172,'QUIRIHUE',8),
  235. (187,'RANQUIL',8),
  236. (176,'SAN CARLOS',8),
  237. (178,'SAN FABIAN',8),
  238. (177,'SAN GREGORIO DE ÑIQUEN',8),
  239. (181,'SAN IGNACIO',8),
  240. (179,'SAN NICOLAS',8),
  241. (343,'SAN PEDRO DE LA PAZ',8),
  242. (211,'SAN ROSENDO',8),
  243. (205,'SANTA BARBARA',8),
  244. (196,'SANTA JUANA',8);
  245. INSERT INTO `comunas` VALUES (189,'TALCAHUANO',8),
  246. (203,'TIRUA',8),
  247. (190,'TOME',8),
  248. (173,'TREHUACO',8),
  249. (209,'TUCAPEL',8),
  250. (207,'YUMBEL',8),
  251. (183,'YUNGAY',8),
  252. (216,'ANGOL',9),
  253. (235,'CARAHUE',9),
  254. (220,'COLLIPULLI',9),
  255. (230,'CUNCO',9),
  256. (225,'CURACAUTIN',9),
  257. (305,'CURARREHUE',9),
  258. (221,'ERCILLA',9),
  259. (229,'FREIRE',9),
  260. (232,'GALVARINO',9),
  261. (238,'GORBEA',9),
  262. (231,'LAUTARO',9),
  263. (240,'LONCOCHE',9),
  264. (226,'LONQUIMAY',9),
  265. (218,'LOS SAUCES',9),
  266. (223,'LUMACO',9),
  267. (304,'MELIPEUCO',9),
  268. (234,'NUEVA IMPERIAL',9),
  269. (345,'PADRE LAS CASAS',9),
  270. (233,'PERQUENCO',9),
  271. (237,'PITRUFQUEN',9),
  272. (242,'PUCON',9),
  273. (236,'PUERTO SAAVEDRA',9),
  274. (217,'PUREN',9),
  275. (219,'RENAICO',9),
  276. (227,'TEMUCO',9),
  277. (306,'TEODORO SCHMIDT',9),
  278. (239,'TOLTEN',9),
  279. (222,'TRAIGUEN',9),
  280. (224,'VICTORIA',9),
  281. (228,'VILCUN',9),
  282. (241,'VILLARRICA',9),
  283. (277,'ANCUD',10),
  284. (265,'CALBUCO',10),
  285. (270,'CASTRO',10),
  286. (280,'CHAITEN',10),
  287. (271,'CHONCHI',10),
  288. (262,'COCHAMO',10),
  289. (276,'CURACO DE VELEZ',10),
  290. (279,'DALCAHUE',10),
  291. (268,'FRESIA',10);
  292. INSERT INTO `comunas` VALUES (269,'FRUTILLAR',10),
  293. (281,'FUTALEUFU',10),
  294. (308,'HUALAIHUE',10),
  295. (267,'LLANQUIHUE',10),
  296. (264,'LOS MUERMOS',10),
  297. (263,'MAULLIN',10),
  298. (255,'OSORNO',10),
  299. (282,'PALENA',10),
  300. (261,'PUERTO MONTT',10),
  301. (258,'PUERTO OCTAY',10),
  302. (266,'PUERTO VARAS',10),
  303. (274,'PUQUELDON',10),
  304. (260,'PURRANQUE',10),
  305. (256,'PUYEHUE',10),
  306. (272,'QUEILEN',10),
  307. (273,'QUELLON',10),
  308. (278,'QUEMCHI',10),
  309. (275,'QUINCHAO',10),
  310. (259,'RIO NEGRO',10),
  311. (307,'SAN JUAN DE LA COSTA',10),
  312. (257,'SAN PABLO',10),
  313. (285,'AYSEN',11),
  314. (287,'CHILE CHICO',11),
  315. (286,'CISNES',11),
  316. (289,'COCHRANE',11),
  317. (284,'COYHAIQUE',11),
  318. (309,'GUAITECAS',11),
  319. (312,'LAGO VERDE',11),
  320. (310,'O´HIGGINS',11),
  321. (288,'RIO IBAÑEZ',11),
  322. (311,'TORTEL',11),
  323. (316,'LAGUNA BLANCA',12),
  324. (319,'NAVARINO',12),
  325. (292,'PORVENIR',12),
  326. (317,'PRIMAVERA',12),
  327. (291,'PUERTO NATALES',12),
  328. (290,'PUNTA ARENAS',12),
  329. (314,'RIO VERDE',12),
  330. (315,'SAN GREGORIO',12),
  331. (318,'TIMAUKEL',12),
  332. (313,'TORRES DEL PAINE',12),
  333. (109,'ALHUE',13);
  334. INSERT INTO `comunas` VALUES (103,'BUIN',13),
  335. (99,'CALERA DE TANGO',13),
  336. (333,'CERRILLOS',13),
  337. (324,'CERRO NAVIA',13),
  338. (76,'COLINA',13),
  339. (75,'CONCHALI',13),
  340. (83,'CURACAVI',13),
  341. (338,'EL BOSQUE',13),
  342. (89,'EL MONTE',13),
  343. (328,'ESTACION CENTRAL',13),
  344. (334,'HUECHURABA',13),
  345. (330,'INDEPENDENCIA',13),
  346. (87,'ISLA DE MAIPO',13),
  347. (96,'LA CISTERNA',13),
  348. (93,'LA FLORIDA',13),
  349. (97,'LA GRANJA',13),
  350. (327,'LA PINTANA',13),
  351. (92,'LA REINA',13),
  352. (78,'LAMPA',13),
  353. (71,'LAS CONDES',13),
  354. (332,'LO BARNECHEA',13),
  355. (337,'LO ESPEJO',13),
  356. (325,'LO PRADO',13),
  357. (323,'MACUL',13),
  358. (94,'MAIPU',13),
  359. (90,'MARIA PINTO',13),
  360. (88,'MELIPILLA',13),
  361. (91,'ÑUÑOA',13),
  362. (339,'PADRE HURTADO',13),
  363. (104,'PAINE',13),
  364. (336,'PEDRO AGUIRRE CERDA',13),
  365. (85,'PEÑAFLOR',13),
  366. (322,'PEÑALOLEN',13),
  367. (101,'PIRQUE',13),
  368. (72,'PROVIDENCIA',13),
  369. (82,'PUDAHUEL',13),
  370. (100,'PUENTE ALTO',13),
  371. (79,'QUILICURA',13),
  372. (81,'QUINTA NORMAL',13),
  373. (329,'RECOLETA',13),
  374. (77,'RENCA',13),
  375. (98,'SAN BERNARDO',13),
  376. (335,'SAN JOAQUIN',13);
  377. INSERT INTO `comunas` VALUES (102,'SAN JOSE DE MAIPO',13),
  378. (95,'SAN MIGUEL',13),
  379. (108,'SAN PEDRO',13),
  380. (326,'SAN RAMON',13),
  381. (70,'SANTIAGO CENTRO',13),
  382. (73,'SANTIAGO OESTE',13),
  383. (84,'SANTIAGO SUR',13),
  384. (86,'TALAGANTE',13),
  385. (80,'TIL-TIL',13),
  386. (331,'VITACURA',13),
  387. (244,'CORRAL',14),
  388. (248,'FUTRONO',14),
  389. (251,'LA UNION',14),
  390. (254,'LAGO RANCO',14),
  391. (249,'LANCO',14),
  392. (247,'LOS LAGOS',14),
  393. (246,'MAFIL',14),
  394. (245,'MARIQUINA',14),
  395. (243,'VALDIVIA',14),
  396. (250,'PANGUIPULLI',14),
  397. (252,'PAILLACO',14),
  398. (253,'RIO BUENO',14),
  399. (1,'ARICA',15),
  400. (295,'CAMARONES',15),
  401. (293,'GENERAL LAGOS',15),
  402. (294,'PUTRE',15);
  403. UNLOCK TABLES;
  404. -- select * from comunas
  405. -- truncate table comunas

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: urbanchile on August 28, 2009

gracias me va a servir muchisimo

Posted By: knxroot on September 19, 2011

versión actualizada en https://github.com/knxroot/BDCUT_CL

Posted By: rickyslow on September 12, 2012

Gracias!

You need to login to post a comment.