MySQL select into

MYSQL不支持:

Select * Into new_table_name from old_table_name; 
Create table new_table_name (Select * from old_table_name);

再加上一个UUID作为ID,但distinct要放在前面。

create table TABLE1  select distinct county_code AS COUNTY_CODE, uuid() AS ID, city_code AS CITY_CODE, province_code AS PROVINCE_CODE, county_name AS COUNTY_NAME, city_name AS CITY_NAME, province_name AS_PROVINCE_NAME from TABLE2;

原文地址:https://www.cnblogs.com/wardensky/p/7873896.html