All pastes #2055347 Raw Edit

Mine

public text v1 · immutable
#2055347 ·published 2011-05-08 15:48 UTC
rendered paste body
CREATE TABLE `game` (
  `id` int(6) unsigned NOT NULL auto_increment,
  `home_team_id` smallint(4) unsigned NOT NULL default '0',
  `guest_team_id` smallint(4) unsigned NOT NULL default '0',
  `home_team_score` smallint(2) unsigned NOT NULL default '0',
  `guest_team_score` smallint(2) unsigned NOT NULL default '0',
  `winning_type` varchar(3) collate utf8_latvian_ci default NULL,
  `game_date` datetime default '0000-00-00 00:00:00',
  `place` varchar(100) collate utf8_latvian_ci default NULL,
  `descr` text collate utf8_latvian_ci,
  `turn_id` smallint(4) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `home_team_id` (`home_team_id`),
  KEY `guest_team_id` (`guest_team_id`),
  KEY `turn_id` (`turn_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_latvian_ci;
ALTER TABLE `game`
  ADD CONSTRAINT `game_ibfk_1` FOREIGN KEY (`home_team_id`) REFERENCES `team` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `game_ibfk_3` FOREIGN KEY (`turn_id`) REFERENCES `turnament` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `game_ibfk_4` FOREIGN KEY (`guest_team_id`) REFERENCES `team` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;


INSERT INTO  `ielashokejs_gold_lv`.`game` (
`id` , `home_team_id` , `guest_team_id` , `home_team_score` , `guest_team_score` , `winning_type` ,
`game_date` , `place` , `descr` , `turn_id` )
VALUES (
NULL ,  '21',  '21',  '0',  '0', NULL ,  '2011-05-08 00:00:00', NULL , 'testtest' ,  '130'
);

->

#1114 - The table 'game' is full 


SELECT COUNT( * ) 
FROM  `game`;

count(*)
324