SQL表复制

数据库表结构及数据完整复制(跨数据库)

SELECT * INTO test FROM db_test.dbo.user_info

数据库表结构及数据完整复制

SELECT * INTO test FROM user_info

 复制表数据

insert into test select * from  user_info

 复制部分字段

insert into PAY_AI_POS_PARAM (papp_aiid,papp_pos_poundage,papp_pos_cap_fee,papp_pos_default_pay_max_amount,papp_pos_max_amount,papp_order_check_date,
    papp_ordinary_check_date,papp_pic_extention) 
    select ai_id,ai_pos_poundage,ai_pos_cap_fee,ai_pos_default_pay_max_amount,ai_pos_max_amount,
    ai_order_check_date,ai_ordinary_check_date,ai_pic_extention from account_info where ai_pic_extention !=''
原文地址:https://www.cnblogs.com/szfhquan/p/2916629.html