导数据入mysql数据库

版权声明:觉得还行的小伙伴,希望留个赞 https://blog.csdn.net/qq_37345604/article/details/85319573

Ctrl + C excel数据源

Ctrl + V 粘贴到数据库表中

1、新建一个临时表

2、粘贴数据到临时表中

注意:复制粘贴方法,必须保证粘贴的excel里面数据列和数据库表中的字段个数相同,否则报错

编写sql,使两个表的数据同步

INSERT INTO uxuexi.cp_myUploadPaper (

    edition_id,

    stage,

    SUBJECT,

    edition_code,

    type_name

  ) 

  SELECT 

    tp.id,

    tp.region_id,

    tp.subject_id,

    tp.edition_id,

    tp.type_name 

  FROM

    uxuexi.test_paper AS tp ;

猜你喜欢

转载自blog.csdn.net/qq_37345604/article/details/85319573
今日推荐