There is something wrong with the SQL after this error, and I'm not sure what.
Error: You have an error in your SQL Syntax. Please check the manual that corresponds to your MySQL server version for the right syntax to use near '(0), PRIMARY KEY (AddressID
), CONSTRAINT FK_Address_Profile
FOREIGN KEY ' at line 15
and here is the create syntax:
DROP TABLE IF EXISTS `MyDB_dbo`.`Address`; CREATE TABLE `MyDB_dbo`.`Address` ( `AddressID` INT(10) NOT NULL AUTO_INCREMENT, `ProfileID` INT(10) NOT NULL, `Address1` VARCHAR(100) NOT NULL, `Address2` VARCHAR(100) NULL, `City` VARCHAR(50) NOT NULL, `State` VARCHAR(50) NOT NULL, `ZipCode` VARCHAR(50) NOT NULL, `ZipPlus` VARCHAR(6) NULL, `Country` VARCHAR(50) NULL, `MailReturned` DATETIME NULL, `DPVStatus` VARCHAR(1) NULL, `DateCreated` DATETIME NOT NULL, `StaffID` INT(10) NOT NULL, `Active` TINYINT NOT NULL DEFAULT (0), PRIMARY KEY (`AddressID`), CONSTRAINT `FK_Address_Profile` FOREIGN KEY `FK_Address_Profile` (`ProfileID`) REFERENCES `MyDB_dbo`.`Profile` (`ProfileID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE = INNODB;
Is there something wrong with the CONSTRAINT keyword or something?