我有这张表,其中包含这些列:
CREATE TABLE CARD
(
CARD_IDE INT NOT NULL IDENTITY,
CARD_NAME VARCHAR(50) NOT NULL,
CARD_NUMBER NUMERIC(4) NOT NULL,
CARD_COLOR VARCHAR(10),
CARD_MANA_COST VARCHAR(30),
CARD_MANA_CONVT VARCHAR(3),
CARD_TYPE VARCHAR(50),
CARD_POWER VARCHAR(2),
CARD_TOUGH VARCHAR(2),
CARD_RARTY VARCHAR(1) NOT NULL,
CARD_TEXT_ABILT VARCHAR(800),
CARD_TEXT_FLAVR VARCHAR(800),
CARD_ARTST_NAME VARCHAR(100),
CARD_SET_IDE INT NOT NULL,
CARD_FLAG_FACE INT NOT NULL DEFAULT 0,
CARD_CHILD_IDE INT
);
GO
表的创建本身不会造成任何问题。我们用脚本提供我们的主要数据以进行测试。然而,这些专栏CARD_FLAG_FACE
和CARD_CHILD_IDE
本周新推出的,它们给我带来了问题。
这是我们为提供数据而滚动的脚本:
INSERT INTO CARD (CARD_NUMBER, CARD_NAME, CARD_COLOR, CARD_MANA_COST, CARD_MANA_CONVT, CARD_TYPE, CARD_POWER, CARD_TOUGH, CARD_RARTY, CARD_TEXT_ABILT, CARD_TEXT_FLAVR, CARD_ARTST_NAME, CARD_FLAG_FACE, CARD_CHILD_IDE, CARD_SET_IDE)
SELECT 1, 'Angel of Glory''s Rise', 'White', '5WW', '7', 'Creature - Angel', '4', '6', 'Common', 'Flying When Angel of Glory''s Rise enters the battlefield, exile all Zombies, then return all Human creature cards from your graveyard to the battlefield. ', '"Justice isn''t done until undeath is undone." ', 'James Ryman', 0, null, @CardSetIdForAVR
GO
如果我们运行它,我会收到以下错误:
消息 8152、级别 16、状态 14、第 9 行
字符串或二进制数据将被截断。
该语句已终止。
第 9 行是INSERT
语句的确切行,这让我感到困惑。现在,如果我在剥离两个新列的同时运行相同的脚本:
INSERT INTO CARD (CARD_NUMBER, CARD_NAME, CARD_COLOR, CARD_MANA_COST, CARD_MANA_CONVT, CARD_TYPE, CARD_POWER, CARD_TOUGH, CARD_RARTY, CARD_TEXT_ABILT, CARD_TEXT_FLAVR, CARD_ARTST_NAME, CARD_SET_IDE)
SELECT 1, 'Angel of Glory''s Rise', 'White', '5WW', '7', 'Creature - Angel', '4', '6', 'Common', 'Flying When Angel of Glory''s Rise enters the battlefield, exile all Zombies, then return all Human creature cards from your graveyard to the battlefield. ', '"Justice isn''t done until undeath is undone." ', 'James Ryman', @CardSetIdForAVR
GO
现在运行顺利。我不明白为什么会发生错误,我需要你的帮助。
编辑
根据许多请求(并且因为我找不到错误),我发布了原始代码。