by Alf Christ » Thu, 20 Jul 2006 07:06:55
On Tue, 18 Jul 2006 15:33:49 -0400, "Hilary Cotter"
Could it be the size of VARCHAR that is the culprit?
This SQL works:
DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments` (
`CommentsID` int(10) unsigned NOT NULL auto_increment,
`EkteskapsID` bigint(20) NOT NULL default '0',
`PersonID` bigint(20) NOT NULL default '0',
`ContributionsID` int(10) unsigned default NULL,
`Time` datetime default NULL,
`From_` bigint(20) default NULL,
`To_` bigint(20) default NULL,
`Text` text,
`Read_` tinyint(1) default NULL,
`From_Forening` int(10) unsigned default NULL,
`To_Forening` int(10) unsigned default NULL,
PRIMARY KEY (`CommentsID`,`EkteskapsID`,`PersonID`),
KEY `EkteskapsID` (`EkteskapsID`,`PersonID`),
CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`EkteskapsID`, `PersonID`)
REFERENCES `persons` (`EkteskapsID`, `PersonID`) ON DELETE NO ACTION
ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
This don't:
DROP TABLE IF EXISTS `counties`;
CREATE TABLE `counties` (
`CountyID` bigint(20) NOT NULL auto_increment,
`CountryID` bigint(20) default NULL,
`Name` varchar(255) default '',
PRIMARY KEY (`CountyID`),
KEY `CountryID` (`CountryID`),
CONSTRAINT `counties_ibfk_1` FOREIGN KEY (`CountryID`) REFERENCES
`countries` (`CountryID`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
In case, what is max supported by SQL SERVER ?