ALTER TABLE and MODIFY COLUMN not working?

willardbat

New Member
I'm trying to modify the ENUM values of a column. I'm testing this on a table/column that is installed as part of MySQL (I'm using WAMP). Here's my SQL:\[code\]ALTER TABLE `world`.`country` MODIFY COLUMN `Continent` enum('Asia','Europe','North America','Africa','Oceania','Antarctica','South America', 'Foo') NOT NULL DEFAULT 'Asia'\[/code\]In this example, I am adding \[code\]Foo\[/code\] to the list of ENUM. I get no errors from the SQL. However when I look at the table definition again, \[code\]Foo\[/code\] is not there.Any ideas what's wrong?UPDATE 1:\[code\]ALTER TABLE `world`.`country` MODIFY COLUMN `Continent` enum('Asia','Europe','North America','Africa','Oceania','Antarctica','South America', 'Foo') NOT NULL DEFAULT 'Asia';/* Affected rows: 0 Found rows: 0 Warnings: 0 Duration for 1 query: 0.047 sec. */\[/code\]UPDATE 2:\[code\]-- ---------------------------------------------------------- Host: 127.0.0.1-- Server version: 5.5.24-log - MySQL Community Server (GPL)-- Server OS: Win32-- HeidiSQL Version: 7.0.0.4372-- --------------------------------------------------------/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;/*!40101 SET NAMES utf8 */;/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;-- Dumping structure for table world.countryCREATE TABLE IF NOT EXISTS `country` ( `Code` char(3) NOT NULL DEFAULT '', `Name` char(52) NOT NULL DEFAULT '', `Continent` enum('Asia','Europe','North America','Africa','Oceania','Antarctica','South America') NOT NULL DEFAULT 'Asia', `Region` char(26) NOT NULL DEFAULT '', `SurfaceArea` float(10,2) NOT NULL DEFAULT '0.00', `IndepYear` smallint(6) DEFAULT NULL, `Population` int(11) NOT NULL DEFAULT '0', `LifeExpectancy` float(3,1) DEFAULT NULL, `GNP` float(10,2) DEFAULT NULL, `GNPOld` float(10,2) DEFAULT NULL, `LocalName` char(45) NOT NULL DEFAULT '', `GovernmentForm` char(45) NOT NULL DEFAULT '', `HeadOfState` char(60) DEFAULT NULL, `Capital` int(11) DEFAULT NULL, `Code2` char(2) NOT NULL DEFAULT '', PRIMARY KEY (`Code`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;-- Data exporting was unselected./*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\[/code\]
 
Top