use tecess;
create table dmap (mtype varchar(3), dfields varchar(10),fpos int,flen int, fdesc varchar(250));

create table haad_dat(
id int auto_increment primary key,
weight 	decimal (3,3),
V101 	varchar (10),
V102 	int (1),
V103 	varchar (10),
V1 	int (1),
V2a 	int (2),
V2b 	int (2),
V2c 	int (2),
V2d 	int (2),
V3 	int (1),
V4 	int (1),
V5 	int (1),
V6 	int (1),
V7 	int (1),
V8 	varchar (6),
V9_1 	int (1),
V9_2 	int (1),
V9_3 	int (1),
V9_4 	int (1),
V9_5 	int (1),
V9_6 	int (1),
V9_7 	int (1),
V10_1 	varchar (2),
V10_2 	varchar (2),
V10_3 	varchar (2),
V10_4 	varchar (2),
V10_5 	varchar (2),
V11_1 	varchar (2),
V11_2 	varchar (2),
V12 	varchar (4),
V13_1 	int (1),
V13_2 	int (1),
V13_3 	int (1),
V13_4 	int (1),
V14_1 	int (1),
V14_2 	int (1),
V14_3 	int (1),
V15_1 	int (1),
V15_2 	int (1),
V15_3 	int (1),
V15_4 	int (1),
V15_5 	int (1),
V16 	int (1),
V17_1 	int (1),
V17_2 	int (1),
V17_3 	int (1),
V18_1 	int (1),
V18_2 	int (1),
V18_3 	int (1),
V19_1 	int (1),
V19_2 	int (1),
V19_3 	int (1),
V20_1 	int (1),
V20_2 	int (1),
V20_3 	int (1),
V20_4 	int (1),
V20_5 	int (1),
V20_6 	int (1),
V21_1 	int (1),
V21_2 	int (1),
V22_1 	int (1),
V22_2 	int (1),
V22_3 	int (1),
V22_4 	int (1),
V22_5 	int (1),
V22_6 	int (1),
V23 	varchar (9),
V24 	varchar (9),
V25_1 	int (1),
V25_2 	int (1),
V25_3 	int (1),
V25_4 	int (1),
V25_5 	int (1),
V26_1 	int (1),
V26_2 	int (1),
V26_3 	int (1),
V26_4 	int (1),
V26_5 	int (1),
V26_6 	int (1),
V26_7 	int (1),
V26_8 	int (1),
V26_9 	int (1),
V26_10 	int (1),
V26_11 	int (1),
V27_1 	varchar (5),
V27_2 	varchar (5),
V28 	varchar (4),
V291_1 	int (2),
V291_2 	int (2),
V291_3 	int (2),
V292 	int (3),
V30_1 	int (1),
V30_2 	int (1),
V30_3 	int (1),
V30_4 	int (1),
V30_5 	int (1),
V30_6 	int (1),
V30_7 	int (1),
V30_8 	int (1),
V31_1 	int (1),
V31_2 	int (1),
V31_3 	int (1),
V31_4 	int (1),
V31_5 	int (1),
V32 	int (1),
V33_1 	varchar (50),
V33_2 	varchar (50),
V33_3 	varchar (50),
V34 	varchar (200),
V35_1 	varchar (4),
V35b 	int (4),
V36 	int (2),
V37_1 	varchar (60),
V38a 	int (2),
V38b 	int (2),
V38c 	int (2),
V38d 	int (2),
V38e 	int (2),
V380 	int (2),
V39 	int (1),
V40 	int (2),
V41 	int (2),
V42 	varchar (500));

ALTER TABLE `haad_dat` DROP INDEX `uniq`, ADD UNIQUE `uniq` (`weight`, `V10_1`, `V10_2`, `V10_3`, `V1`, `V39`, `V40`, `V41`)