CREATE TABLE batsman
(
InningId int NOT NULL,
PlayerId int NOT NULL,
BatsmanOrder int(2) NOT NULL,
BatScore int NOT NULL default 0,
Balls int NOT NULL default 0,
sixes int NOT NULL default 0,
fours int NOT NULL default 0,
`out` varchar(10) NOT NULL, /*Foreign*/
catcher int, /*Foreign*/
bowler int, /*Foreign*/
Primary Key(InningId, PlayerId),
Foreign Key (PlayerId) references player(Id),
Foreign Key (InningId) references inning(Id),
CHECK (`out` in ("Caught", "Run Out", "Not Out", "Bowled", "lbw"))
) ENGINE=INNODB;
I'm using MySql and I cannot get my Check
to work it seems to simply not work i don't get a error or anything. It may be something to do with the ''
tags around the out as out is a key word!