我有這個表:如何解決「變量‘的sql_mode’不能設置爲‘NULL’的價值」的錯誤
# Dumping structure for table editz.to_import
CREATE TABLE IF NOT EXISTS `to_import` (
`id` int(11) unsigned NOT NULL auto_increment,
`reference` int(11) unsigned NOT NULL,
`trackid` int(11) unsigned NOT NULL,
`side_pos1` char(2) NOT NULL,
`side1` varchar(255) NOT NULL,
`pos1` char(2) NOT NULL,
`hh1` char(2) NOT NULL,
`mm1` char(2) NOT NULL,
`ss1` char(2) NOT NULL,
`atl1` varchar(255) NOT NULL,
`side_pos2` char(2) NOT NULL,
`side2` varchar(255) NOT NULL,
`pos2` char(2) NOT NULL,
`hh2` char(2) NOT NULL,
`mm2` char(2) NOT NULL,
`ss2` char(2) NOT NULL,
`atl2` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1311 DEFAULT CHARSET=utf8;
# Dumping data for table editz.to_import: ~1.025 rows (approximately)
DELETE FROM `to_import`;
/*!40000 ALTER TABLE `to_import` DISABLE KEYS */;
INSERT INTO `to_import` (`id`, `reference`, `trackid`, `side_pos1`, `side1`, `pos1`, `hh1`, `mm1`, `ss1`, `atl1`, `side_pos2`, `side2`, `pos2`, `hh2`, `mm2`, `ss2`, `atl2`) VALUES
(1, 205, 550, '0', 'Single Side', '0', '??', '??', '??', 'Noizefucker - Tons Of Bluesteel - Special Forces', '0', 'Single Side', '0', '??', '??', '??', 'Noizefucker - Tons Of Bluesteel - Special Forces'),
... some lines, approx 1300)...
(1310, 268, 463, '#', '', '20', '00', '41', '00', 'Ingler - Trek', '#', '', '20', '00', '41', '00', 'Ingler - Trek');
/*!40000 ALTER TABLE `to_import` ENABLE KEYS */;
/*!40101 SET [email protected]_SQL_MODE */;
/*!40014 SET [email protected]_FOREIGN_KEY_CHECKS */;
/*!40101 SET [email protected]_CHARACTER_SET_CLIENT */;
但是當我嘗試使用phpMyAdmin導入,我得到這個消息:
#1231 - Variable 'sql_mode' can't be set to the value of 'NULL'
爲什麼?我該如何解決這個問題?我使用HeidiSql 6出口該表......其實表和數據在我的數據庫添加
,只是我不明白爲什麼該消息......
謝謝!我在分解轉儲時遇到了這個問題(提取程序) – 2015-04-10 19:49:24
這應該被標記爲正確的答案。 – Trendfischer 2015-10-29 08:53:18