All pastes #823102 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-12-19 04:27 UTC
rendered paste body
guild_data1 = structure rev 2583

CREATE TABLE `guild_data1` (
  `guildid` int(30) NOT NULL,
  `playerid` int(30) NOT NULL,
  `guildRank` int(30) NOT NULL,
  `publicNote` varchar(300) NOT NULL,
  `officerNote` varchar(300) NOT NULL,
  `lastWithdrawReset` int(30) NOT NULL DEFAULT '0',
  `withdrawlsSinceLastReset` int(30) NOT NULL DEFAULT '0',
  `lastItemWithdrawReset0` int(30) NOT NULL DEFAULT '0',
  `itemWithdrawlsSinceLastReset0` int(30) NOT NULL DEFAULT '0',
  `lastItemWithdrawReset1` int(30) NOT NULL,
  `itemWithdrawlsSinceLastReset1` int(30) NOT NULL,
  `lastItemWithdrawReset2` int(30) NOT NULL,
  `itemWithdrawlsSinceLastReset2` int(30) NOT NULL,
  `lastItemWithdrawReset3` int(30) NOT NULL,
  `itemWithdrawlsSinceLastReset3` int(30) NOT NULL,
  `lastItemWithdrawReset4` int(30) NOT NULL,
  `itemWithdrawlsSinceLastReset4` int(30) NOT NULL,
  `lastItemWithdrawReset5` int(30) NOT NULL,
  `itemWithdrawlsSinceLastReset5` int(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

----------------------------------------

guild_data = old structure


-- Table "guild_data" DDL

CREATE TABLE `guild_data` (
  `guildid` int(30) NOT NULL,
  `playerid` int(30) NOT NULL,
  `guildRank` int(30) NOT NULL,
  `publicNote` varchar(300) NOT NULL,
  `officerNote` varchar(300) NOT NULL,
  `lastWithdrawReset` int(30) NOT NULL DEFAULT '0',
  `withdrawlsSinceLastReset` int(30) NOT NULL DEFAULT '0',
  `lastItemWithdrawReset` int(30) NOT NULL DEFAULT '0',
  `itemWithdrawlsSinceLastReset` int(30) NOT NULL DEFAULT '0',
  `depositedMoney` int(30) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


----------------------------------------

Query :

INSERT INTO `guild_data1` SELECT `guildid`,`playerid`,`guildRank`,`publicNote`,`officerNote` FROM `guild_data`;


Error :

[Err] 1136 - Column count doesn't match value count at row 1
[Err] INSERT INTO `guild_data1` SELECT `guildid`,`playerid`,`guildRank`,`publicNote`,`officerNote` FROM `guild_data`;
[Msg] Finished - Unsuccessfully