mysql不支持select into解决

页面导航:首页 > 数据库 > Mysql > mysql不支持select into解决

mysql不支持select into解决

来源: 作者: 时间:2016-02-17 10:07 【

mysql不支持select into解决替代方案 insert into newTableName(column1,column2) select * from oldTableNameINSERT INTO `aw_daily_call_task`(tenantId,sub_product_name, call_type,call...
不支持select into解决
 
替代方案
 insert into newTableName(column1,column2)   select * from  oldTableName

INSERT INTO  `aw_daily_call_task`(tenantId,sub_product_name, 
call_type,call_date,expire_date,username,customer_type,start_date,end_date,budget,product_type) 
SELECT t1.`tenant_id` as tenantId, 
        t1.`sub_product_name`, 
        1 as call_type, 
        t1.`active_date` as call_date, 
        DATE_ADD(t1.`active_date`,INTERVAL 1 DAY) as expire_date, 
        t1.`link_man` as username, 
        1 as customer_type, 
        t1.`active_date`  as start_date, 
        DATE_ADD(t1.`active_date`,INTERVAL t1.`remain_day` DAY) as end_date, 
        1 as budget, 
        t1.`product_type` 
FROM `aw_old_products` t1

 


Tags:

文章评论

最 近 更 新
热 点 排 行
Js与CSS工具
代码转换工具

<