Monday, 9 September 2013

SQL querry syntax error

SQL querry syntax error

Hi guys I have executed this query in MySQL but it is showing a syntax
error near Unique key statement ...Can anybody help me to clear the
error..!
CREATE TABLE IF NOT EXISTS `friends` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`providerId` int(10) unsigned NOT NULL DEFAULT '0',
`requestId` int(10) unsigned NOT NULL DEFAULT '0',
`status` binary(1) NOT NULL DEFAULT '0', PRIMARY KEY (`Id`),
UNIQUE KEY `Index_3` (`providerId`,`requestId`),
KEY `Index_2` (`providerId`,`requestId`,`status`))
ENGINE=InnoDB DEFAULT CHARSET=latin1
COMMENT='providerId is the Id of the users who wish to be friend
with' AUTO_INCREMENT=7 ;

No comments:

Post a Comment