#1050 - 表'批次'已经存在于通过mysql导入

时间:2017-07-25 08:03:06

标签: php mysql

我在导入新的.sql时收到以下错误。请帮忙解决。我正在导入新的数据库。

错误

SQL查询:

CREATE TABLE `batch` (
  `bid` int(10) UNSIGNED NOT NULL COMMENT 'Primary Key: Unique batch ID.',
  `token` varchar(64) CHARACTER SET ascii NOT NULL COMMENT 'A string token generated against the current user''s session id and the batch id, used to ensure that only the user who submitted the batch can effectively access it.',
  `timestamp` int(11) NOT NULL COMMENT 'A Unix timestamp indicating when this batch was submitted for processing. Stale batches are purged at cron time.',
  `batch` longblob COMMENT 'A serialized array containing the processing data for the batch.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Stores details about batches (processes that run in…'

MySQL说:文档

#1050 - Table 'batch' already exists

2 个答案:

答案 0 :(得分:2)

如果您不想删除该表并丢失其中的任何潜在数据,只需将您的创建查询调整为如下所示:

CREATE TABLE IF NOT EXISTS ...

答案 1 :(得分:0)

先尝试放下桌子,也许你已经把桌子弄好了。