我有一个.sql文件并导入它,但我尝试抛出一个错误,说它在表中,但我';我只是用这种方式创建数据库和表


I have a .sql file and import it but I attempt throws an error which says it esiste the table but I'm just creating the database and table in this way

我有一个.sql文件并导入它,但我试图抛出一个错误,表明表已经存在,但我只是用这种方式创建数据库和表

CREATE DATABASE `bancoproyectos2010` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `bancoproyectos2010`;
CREATE TABLE IF NOT EXISTS `accion` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `id_asun` int(2) DEFAULT NULL,
  `id_es` int(2) DEFAULT NULL,
  `id_prog` int(3) DEFAULT NULL,
  `id_PE` int(3) DEFAULT NULL,
  `num_acc` int(3) DEFAULT NULL,
  `nombre_Accion` text,
  PRIMARY KEY (`id`),
  KEY `id_asun` (`id_asun`),
  KEY `id_es` (`id_es`),
  KEY `id_prog` (`id_prog`),
  KEY `id_PE` (`id_PE`),
  KEY `num_acc` (`num_acc`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=177 ;

扔给我:MySQL表示:

1050-表'bancoproyectos2010acción'已存在

数据库是从头开始创建的,当它到达表时,会创建.ibd文件,但不会出现在phpmyadmin中,但当尝试从phpmyadmin创建表时,还会抛出已经存在的错误

1050-表'bancoproyectos2010acción'已存在

你可以试试这个:

DROP TABLE IF EXISTS `accion`
REPAIR TABLE `accion`
相关文章: