Neo+test
02-07-2008, 00:11
Ошибка
SQL-запрос:
CREATE TABLE history(
timeOfMove DATETIME NOT NULL ,
gameID SMALLINT NOT NULL ,
curPiece ENUM( 'pawn', 'bishop', 'knight', 'rook', 'queen', 'king' ) NOT NULL ,
curColor ENUM( 'white', 'black' ) NOT NULL ,
fromRow SMALLINT NOT NULL ,
fromCol SMALLINT NOT NULL ,
toRow SMALLINT NOT NULL ,
toCol SMALLINT NOT NULL ,
replaced ENUM( 'pawn', 'bishop', 'knight', 'rook', 'queen', 'king' ) NULL ,
promotedTo ENUM( 'pawn', 'bishop', 'knight', 'rook', 'queen', 'king' ) NULL ,
CHECK BOOL NOT NULL ,
PRIMARY KEY ( timeOfMove, gameID )
Ответ MySQL: Документация
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL,
PRIMARY KEY(timeOfMove, gameID)' at line 12
Чо за ошибка и как ее исправить. Кто знает, помогите. плиз!
SQL-запрос:
CREATE TABLE history(
timeOfMove DATETIME NOT NULL ,
gameID SMALLINT NOT NULL ,
curPiece ENUM( 'pawn', 'bishop', 'knight', 'rook', 'queen', 'king' ) NOT NULL ,
curColor ENUM( 'white', 'black' ) NOT NULL ,
fromRow SMALLINT NOT NULL ,
fromCol SMALLINT NOT NULL ,
toRow SMALLINT NOT NULL ,
toCol SMALLINT NOT NULL ,
replaced ENUM( 'pawn', 'bishop', 'knight', 'rook', 'queen', 'king' ) NULL ,
promotedTo ENUM( 'pawn', 'bishop', 'knight', 'rook', 'queen', 'king' ) NULL ,
CHECK BOOL NOT NULL ,
PRIMARY KEY ( timeOfMove, gameID )
Ответ MySQL: Документация
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL,
PRIMARY KEY(timeOfMove, gameID)' at line 12
Чо за ошибка и как ее исправить. Кто знает, помогите. плиз!