ALTER TABLE `smsevent` CHANGE `subtype` `subtype` VARCHAR( 3 ) NULL DEFAULT NULL ; 

SELECT smsevent3.id, smsevent4.id, smsevent3.subtype, smsevent4.subtype FROM smsevent3, smsevent4 
WHERE smsevent3.id=smsevent4.id AND smsevent3.subtype=smsevent4.subtype 
AND smsevent3.id='00694'

UPDATE smsevent, smsevent4 SET smsevent.subtype=smsevent4.subtype 
WHERE smsevent.id=smsevent4.id 


CREATE TABLE IF NOT EXISTS `smsevent4` (
  `id` varchar(36) NOT NULL DEFAULT '',
  `subtype` varchar(3) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `smsevent4` (`id`, `subtype`) VALUES
('00001', '5'),
('00002', '5'),
('00003', '5'),
('00004', '6'),
('00005', '6'),
('00006', '5'),
('00007', '5'),
('00008', '5'),
('00009', '5'),
('00010', '5'),
('00011', '5'),
('00012', '6'),
('00013', '6'),
('00014', '5'),
('00015', '5'),
('00016', '6'),
('00017', '7'),
('00018', '5'),
('00019', '6'),
('00020', '6'),
('00021', '12'),
('00022', '7'),
('00023', '1'),
('00024', '5'),
('00025', '5'),
('00026', '12'),
('00027', '12'),
('00028', '1'),
('00029', '1'),
('00030', '5'),
('00031', '6'),
('00032', '1'),
('00033', '6'),
('00034', '5'),
('00035', '9'),
('00036', '7'),
('00037', '12'),
('00038', '12'),
('00039', '12'),
('00040', '12'),
('00041', '1'),
('00042', '1'),
('00043', '6'),
('00044', '5'),
('00045', '7'),
('00046', '6'),
('00047', '5'),
('00048', '12'),
('00049', '5'),
('00050', '12'),
('00051', '9'),
('00052', '12'),
('00053', '5'),
('00054', '5'),
('00055', '6'),
('00056', '5'),
('00057', '12'),
('00058', '5'),
('00059', '6'),
('00060', '7'),
('00061', '10'),
('00062', '13'),
('00063', '13'),
('00064', '5'),
('00065', '6'),
('00066', '7a'),
('00067', '7'),
('00068', '5'),
('00069', '6'),
('00070', '7'),
('00071', '5'),
('00072', '12'),
('00073', '7a'),
('00074', '12'),
('00075', '7a'),
('00076', '12'),
('00077', '7a'),
('00078', '6'),
('00079', '6'),
('00080', '5'),
('00081', '5'),
('00082', '12'),
('00083', '5'),
('00084', '5'),
('00085', '7'),
('00086', '7a'),
('00087', '12'),
('00088', '10'),
('00089', '12'),
('00090', '7a'),
('00091', '7b'),
('00092', '7a'),
('00093', '5'),
('00094', '6'),
('00095', '7'),
('00096', '5'),
('00097', '12'),
('00098', '5'),
('00099', '6'),
('00100', '7'),
('00101', '7a'),
('00102', '12'),
('00103', '7a'),
('00104', '7b'),
('00105', '7a'),
('00106', '5'),
('00107', '6'),
('00108', '5'),
('00109', '6'),
('00110', '7'),
('00111', '12'),
('00112', '5'),
('00113', '7'),
('00114', '11'),
('00115', '6'),
('00116', '7b'),
('00117', '7a'),
('00118', '7b'),
('00119', '7a'),
('00120', '1'),
('00121', '7b'),
('00122', '1'),
('00123', '7a'),
('00124', '5'),
('00125', '5'),
('00126', '7'),
('00127', '6'),
('00128', '12'),
('00129', '5'),
('00130', '6'),
('00131', '6'),
('00132', '7'),
('00133', '7b'),
('00134', '5'),
('00135', '10'),
('00136', '7a'),
('00137', '7b'),
('00138', '1'),
('00139', '7a'),
('00140', '7b'),
('00141', '1'),
('00142', '7c'),
('00143', '7a'),
('00144', '12'),
('00145', '5'),
('00146', '6'),
('00147', '5'),
('00148', '6'),
('00149', '5'),
('00150', '7'),
('00151', '5'),
('00152', '7'),
('00153', '10'),
('00154', '10'),
('00155', '7b'),
('00156', '7c'),
('00157', '7a'),
('00158', '1'),
('00159', '10'),
('00160', '7b'),
('00161', '7c'),
('00162', '7a'),
('00163', '7b'),
('00164', '1'),
('00165', '7c'),
('00166', '7a'),
('00167', '7'),
('00168', '5'),
('00169', '6'),
('00170', '5'),
('00171', '12'),
('00172', '5'),
('00173', '7'),
('00174', '1'),
('00175', '5'),
('00176', '6'),
('00177', '7b'),
('00178', '9'),
('00179', '7c'),
('00180', '7a'),
('00181', '7a'),
('00182', '1'),
('00183', '7b'),
('00184', '13'),
('00185', '1'),
('00186', '7c'),
('00187', '7a'),
('00188', '7b'),
('00189', '8'),
('00190', '7d'),
('00191', '8'),
('00192', '6'),
('00193', '7c'),
('00194', '7a'),
('00195', '5'),
('00196', '6'),
('00197', '1'),
('00198', '5'),
('00199', '7'),
('00200', '5'),
('00201', '12'),
('00202', '5'),
('00203', '7'),
('00204', '7b'),
('00205', '10'),
('00206', '10'),
('00207', '10'),
('00208', '7c'),
('00209', '7a'),
('00210', '1'),
('00211', '7b'),
('00212', '13'),
('00213', '8'),
('00214', '7c'),
('00215', '7a'),
('00216', '8'),
('00217', '7b'),
('00218', '1'),
('00219', '7e'),
('00220', '5'),
('00221', '7c'),
('00222', '7a'),
('00223', '6'),
('00224', '7'),
('00225', '5'),
('00226', '12'),
('00227', '5'),
('00228', '7'),
('00229', '5'),
('00230', '6'),
('00231', '7b'),
('00232', '8'),
('00233', '9'),
('00234', '1'),
('00235', '7c'),
('00236', '7a'),
('00237', '7a'),
('00238', '13'),
('00239', '8'),
('00240', '7b'),
('00241', '1'),
('00242', '7d'),
('00243', '7c'),
('00244', '7a'),
('00245', '8'),
('00246', '11'),
('00247', '5'),
('00248', '6'),
('00249', '5'),
('00250', '12'),
('00251', '1'),
('00252', '7c'),
('00253', '7a'),
('00254', '7a'),
('00255', '5'),
('00256', '7'),
('00257', '5'),
('00258', '6'),
('00259', '6'),
('00260', '7'),
('00261', '7b'),
('00262', '10'),
('00263', '10'),
('00264', '7e'),
('00265', '7c'),
('00266', '7a'),
('00267', '13'),
('00268', '8'),
('00269', '10'),
('00270', '7b'),
('00271', '1'),
('00272', '7c'),
('00273', '7a'),
('00274', '7a'),
('00275', '1'),
('00276', '7b'),
('00277', '7c'),
('00278', '7a'),
('00279', '6'),
('00280', '7'),
('00281', '5'),
('00282', '6'),
('00283', '5'),
('00284', '6'),
('00285', '5'),
('00286', '12'),
('00287', '5'),
('00288', '7'),
('00289', '9'),
('00290', '7c'),
('00291', '7a'),
('00292', '7b'),
('00293', '1'),
('00294', '1'),
('00295', '7d'),
('00296', '13'),
('00297', '8'),
('00298', '7c'),
('00299', '7a'),
('00300', '1'),
('00301', '7b'),
('00302', '6'),
('00303', '7'),
('00304', '5'),
('00305', '6'),
('00306', '19'),
('00307', '7c'),
('00308', '7a'),
('00309', '5'),
('00310', '12'),
('00311', '6'),
('00312', '7'),
('00313', '7b'),
('00314', '7e'),
('00315', '10'),
('00316', '1'),
('00317', '6'),
('00318', '7'),
('00319', '7c'),
('00320', '7a'),
('00321', '7d'),
('00322', '7b'),
('00323', '1'),
('00324', '13'),
('00325', '7c'),
('00326', '7a'),
('00327', '7a'),
('00328', '8'),
('00329', '8'),
('00330', '1'),
('00331', '5'),
('00332', '8'),
('00333', '7b'),
('00334', '5'),
('00335', '6'),
('00336', '7'),
('00337', '19'),
('00338', '19'),
('00339', '19'),
('00340', '19'),
('00341', '19'),
('00342', '19'),
('00343', '7c'),
('00344', '7a'),
('00345', '5'),
('00346', '6'),
('00347', '5'),
('00348', '7'),
('00349', '12'),
('00350', '10'),
('00351', '7b'),
('00352', '1'),
('00353', '8'),
('00354', '8'),
('00355', '7e'),
('00356', '19'),
('00357', '19'),
('00358', '19'),
('00359', '19'),
('00360', '19'),
('00361', '7c'),
('00362', '7a'),
('00363', '7b'),
('00364', '1'),
('00365', '7b'),
('00366', '12'),
('00367', '13'),
('00368', '11'),
('00369', '8'),
('00370', '19'),
('00371', '19'),
('00372', '19'),
('00373', '19'),
('00374', '19'),
('00375', '7c'),
('00376', '7a'),
('00377', '8'),
('00378', '7d'),
('00379', '7b'),
('00380', '1'),
('00381', '5'),
('00382', '6'),
('00383', '5'),
('00384', '7'),
('00385', '6'),
('00386', '7'),
('00387', '19'),
('00388', '1'),
('00389', '19'),
('00390', '19'),
('00391', '19'),
('00392', '19'),
('00393', '19'),
('00394', '7c'),
('00395', '7a'),
('00396', '12'),
('00397', '5'),
('00398', '6'),
('00399', '8'),
('00400', '10'),
('00401', '7b'),
('00402', '9'),
('00403', '19'),
('00404', '19'),
('00405', '19'),
('00406', '19'),
('00407', '19'),
('00408', '7e'),
('00409', '7c'),
('00410', '7a'),
('00411', '7b'),
('00412', '1'),
('00413', '13'),
('00414', '8'),
('00415', '1'),
('00416', '8'),
('00417', '19'),
('00418', '19'),
('00419', '19'),
('00420', '19'),
('00421', '19'),
('00422', '7c'),
('00423', '7a'),
('00424', '7'),
('00425', '1'),
('00426', '7b'),
('00427', '19'),
('00428', '19'),
('00429', '19'),
('00430', '19'),
('00431', '19'),
('00432', '7c'),
('00433', '7a'),
('00434', '6'),
('00435', '7'),
('00436', '19'),
('00437', '5'),
('00438', '6'),
('00439', '12'),
('00440', '5'),
('00441', '5'),
('00442', '7'),
('00443', '7b'),
('00444', '1'),
('00445', '8'),
('00446', '10'),
('00447', '14'),
('00448', '19'),
('00449', '19'),
('00450', '7c'),
('00451', '7a'),
('00452', '7d'),
('00453', '8'),
('00454', '1'),
('00455', '5'),
('00456', '5'),
('00457', '6'),
('00458', '7b'),
('00459', '19'),
('00460', '7c'),
('00461', '7a'),
('00462', '8'),
('00463', '7b'),
('00464', '5'),
('00465', '7'),
('00466', '19'),
('00467', '7'),
('00468', '12'),
('00469', '1'),
('00470', '5'),
('00471', '6'),
('00472', '19'),
('00473', '7c'),
('00474', '7a'),
('00475', '7a'),
('00476', '5'),
('00477', '5'),
('00478', '6'),
('00479', '7e'),
('00480', '8'),
('00481', '10'),
('00482', '7b'),
('00483', '1'),
('00484', '5'),
('00485', '19'),
('00486', '5'),
('00487', '19'),
('00488', '19'),
('00489', '19'),
('00490', '19'),
('00491', '7c'),
('00492', '7a'),
('00493', '5'),
('00494', '5'),
('00495', '12'),
('00496', '5'),
('00497', '13'),
('00498', '7d'),
('00499', '8'),
('00500', '7b'),
('00501', '8'),
('00502', '10'),
('00503', '1'),
('00504', '7c'),
('00505', '7a'),
('00506', '8'),
('00507', '12'),
('00508', '7b'),
('00509', '1'),
('00510', '6'),
('00511', '2'),
('00512', '5'),
('00513', '7'),
('00514', '19'),
('00515', '5'),
('00516', '7'),
('00517', '19'),
('00518', '7c'),
('00519', '7a'),
('00520', '5'),
('00521', '5'),
('00522', '6'),
('00523', '12'),
('00524', '1'),
('00525', '12'),
('00526', '8'),
('00527', '6'),
('00528', '1'),
('00529', '7b'),
('00530', '7e'),
('00531', '6'),
('00532', '19'),
('00533', '5'),
('00534', '6'),
('00535', '19'),
('00536', '7c'),
('00537', '7a'),
('00538', '7a'),
('00539', '5'),
('00540', '1'),
('00541', '1'),
('00542', '7d'),
('00543', '8'),
('00544', '7'),
('00545', '12'),
('00546', '12'),
('00547', '2'),
('00548', '7b'),
('00549', '11'),
('00550', '19'),
('00551', '7c'),
('00552', '7a'),
('00553', '7e'),
('00554', '1'),
('00555', '1'),
('00556', '8'),
('00557', '8'),
('00558', '7b'),
('00559', '13'),
('00560', '19'),
('00561', '19'),
('00562', '7c'),
('00563', '7a'),
('00564', '1'),
('00565', '19'),
('00566', '12'),
('00567', '10'),
('00568', '7'),
('00569', '19'),
('00570', '5'),
('00571', '5'),
('00572', '6'),
('00573', '5'),
('00574', '7'),
('00575', '12'),
('00576', '5'),
('00577', '6'),
('00578', '8'),
('00579', '1'),
('00580', '14'),
('00581', '14'),
('00582', '10'),
('00583', '19'),
('00584', '7c'),
('00585', '7a'),
('00586', '7a'),
('00587', '19'),
('00588', '1'),
('00589', '2'),
('00590', '1'),
('00591', '7b'),
('00592', '5'),
('00593', '19'),
('00594', '7d'),
('00595', '6'),
('00596', '5'),
('00597', '6'),
('00598', '2'),
('00599', '1'),
('00600', '19'),
('00601', '7c'),
('00602', '7a'),
('00603', '19'),
('00604', '1'),
('00605', '8'),
('00606', '1'),
('00607', '1'),
('00608', '7c'),
('00609', '7a'),
('00610', '19'),
('00611', '4'),
('00612', '4'),
('00613', '4'),
('00614', '5'),
('00615', '19'),
('00616', '12'),
('00617', '1'),
('00618', '5'),
('00619', '7'),
('00620', '4'),
('00621', '6'),
('00622', '13'),
('00623', '5'),
('00624', '2'),
('00625', '4'),
('00626', '5'),
('00627', '6'),
('00628', '7b'),
('00629', '4'),
('00630', '7'),
('00631', '2'),
('00632', '4'),
('00633', '4'),
('00634', '8'),
('00635', '4'),
('00636', '4'),
('00637', '7c'),
('00638', '7a'),
('00639', '19'),
('00640', '19'),
('00641', '4'),
('00642', '4'),
('00643', '4'),
('00644', '1'),
('00645', '7b'),
('00646', '4'),
('00647', '7d'),
('00648', '4'),
('00649', '8'),
('00650', '4'),
('00651', '5'),
('00652', '19'),
('00653', '6'),
('00654', '7'),
('00655', '2'),
('00656', '4'),
('00657', '0b'),
('00658', '6'),
('00659', '4'),
('00660', '5'),
('00661', '4'),
('00662', '2'),
('00663', '0b'),
('00664', '7c'),
('00665', '7a'),
('00666', '4'),
('00667', '4'),
('00668', '4'),
('00669', '7e'),
('00670', '4'),
('00671', '8'),
('00672', '0b'),
('00673', '0b'),
('00674', '4'),
('00675', '4'),
('00676', '4'),
('00677', '4'),
('00678', '4'),
('00679', '4'),
('00680', '0b'),
('00681', '0b'),
('00682', '4'),
('00683', '4'),
('00684', '4'),
('00685', '4'),
('00686', '10'),
('00687', '4'),
('00688', '4'),
('00689', '7b'),
('00690', '4'),
('00691', '1'),
('00692', '19'),
('00693', '7c'),
('00694', '7a'),
('00695', '12'),
('00696', '6'),
('00697', '5'),
('00698', '6'),
('00699', '4'),
('00700', '7'),
('00701', '5'),
('00702', '5'),
('00703', '6'),
('00704', '2'),
('00705', '7'),
('00706', '8'),
('00707', '1'),
('00708', '7d'),
('00709', '7b'),
('00710', '7b'),
('00711', '6'),
('00712', '5'),
('00713', '5'),
('00714', '6'),
('00715', '7e'),
('00716', '8');