2017-07-25 9 views
-2

Ich erhalte diesen Fehler beim Importieren einer neuen .sql. Bitte helfen Sie, zu lösen. Ich importiere in eine neue Datenbank.# 1050 - Tabelle 'batch' existiert bereits beim Importieren über mysql

Fehler

SQL-Abfrage:

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 sagte: Dokumentation

#1050 - Table 'batch' already exists 
+1

'Tisch fallen, wenn exists' –

Antwort

0

versuchen, die Tabelle zuerst fallen zu lassen, vielleicht haben Sie schon die Tabelle.

2

Wenn Sie nicht über den Tisch fallen wollen und dort alle möglichen Daten verlieren, stellen Sie einfach Ihre Abfrage erstellen, so beginnen:

CREATE TABLE IF NOT EXISTS ... 
Verwandte Themen