BEGIN
LOAD DATA LOCAL INFILE 'E://0711//bks.log' INTO TABLE t_diaoyonglian CHARACTER SET utf8 FIELDS TERMINATED BY '|' set Site='bks';
LOAD DATA LOCAL INFILE 'E://0711//nss.log' INTO TABLE t_diaoyonglian CHARACTER SET utf8 FIELDS TERMINATED BY '|' set Site='nss';
LOAD DATA LOCAL INFILE 'E://0711//content.log' INTO TABLE t_diaoyonglian CHARACTER SET utf8 FIELDS TERMINATED BY '|' set Site='content';
LOAD DATA LOCAL INFILE 'E://0711//cns.log' INTO TABLE t_diaoyonglian CHARACTER SET utf8 FIELDS TERMINATED BY '|' set Site='cns';
SET @sqlStr:=CONCAT("CREATE TABLE ",ta," LIKE t_diaoyonglian");
PREPARE stmt from @sqlStr;
EXECUTE stmt;
INSERT INTO ta SELECT * FROM t_diaoyonglian
PREPARE stmt from @sqlStr;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END
江户川乱折腾