USE [World00_Character]
GO
 
IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK__tCharacte__nFunc__56D3D912]') AND parent_object_id = OBJECT_ID(N'[dbo].[tCharacterKeyMap]'))
ALTER TABLE [dbo].[tCharacterKeyMap] DROP CONSTRAINT [FK__tCharacte__nFunc__56D3D912]
GO
 
TRUNCATE TABLE [dbo].[tKeyMapInit]
 
GO
 
INSERT INTO [dbo].[tKeyMapInit] (nFunctionNo, nExtendedKey, nASCIICode) VALUES
(0,0,121),
(1,0,27),
(2,0,67),
(3,0,86),
(4,0,73),
(5,0,75),
(6,0,76),
(7,0,72),
(8,0,88),
(9,0,222),
(10,0,77),
(11,0,85),
(12,0,80),
(13,0,82),
(14,0,70),
(15,0,71),
(16,0,0),
(17,0,0),
(18,0,0),
(19,0,0),
(20,0,13),
(21,18,78),
(22,18,71),
(23,0,0),
(24,18,80),
(25,0,0),
(26,0,0),
(27,0,87),
(28,0,83),
(29,16,83),
(30,0,65),
(31,0,68),
(32,0,32),
(33,0,0),
(34,0,38),
(35,0,40),
(36,0,37),
(37,0,39),
(38,0,0),
(39,0,0),
(40,0,36),
(41,0,84),
(42,0,245),
(43,0,66),
(44,16,90),
(45,0,0),
(46,0,35),
(47,0,49),
(48,0,50),
(49,0,51),
(50,0,52),
(51,0,53),
(52,0,54),
(53,0,55),
(54,0,56),
(55,0,57),
(56,0,48),
(57,0,189),
(58,0,187),
(59,16,49),
(60,16,50),
(61,16,51),
(62,16,52),
(63,16,53),
(64,16,54),
(65,16,55),
(66,16,56),
(67,16,57),
(68,16,48),
(69,16,189),
(70,16,187),
(71,18,49),
(72,18,50),
(73,18,51),
(74,18,52),
(75,18,53),
(76,18,54),
(77,18,55),
(78,18,56),
(79,18,57),
(80,18,48),
(81,18,189),
(82,18,187),
(83,0,0),
(84,0,0),
(85,0,0),
(86,0,0),
(87,0,0),
(88,0,0),
(89,0,0),
(90,0,0),
(91,0,0),
(92,0,0),
(93,0,0),
(94,0,0)
 
GO
 
ALTER TABLE [dbo].[tCharacterKeyMap]  WITH CHECK ADD CONSTRAINT [FK__tCharacte__nFunc__56D3D912] FOREIGN KEY([nFunctionNo])
REFERENCES [dbo].[tKeyMapInit] ([nFunctionNo])
GO