这个sqlfiddle链接似乎在调用期间保持状态:http://sqlfiddle.com/#!2/125bc/1
它包含mysql的这个模式:
CREATE TABLE if not exists `standings` (
`teamid` int(11) NOT NULL,
`win` decimal(23,0) default NULL,
`tie` decimal(23,0) default NULL,
`lose` decimal(23,0) default NULL,
PRIMARY KEY (`teamid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `standings` (`teamid`, `win`, `tie`, `lose`) VALUES
(1, 3, 0, 0),
(2, 1, 1, 1),
(3, 1, 1, 1),
(4, 0, 0, 3);
CREATE TABLE if not exists `newscores` (
`recordid` int(11) NOT NULL auto_increment,
`teamid` int(11) NOT NULL,
`gameid` int(11) NOT NULL,
`totalstrokes` int(11) …Run Code Online (Sandbox Code Playgroud)