douji9816 2012-03-29 19:35
浏览 67

将新记录从一个数据库复制到另一个数据库的最佳方法

whose structures are identical and which even have the same id's, now one of these databases collects information from a live feed, what i want to do is find a way to add just the new records to the second database so that the information can then be reviewed and managed, without disturbing the first database.

Is there an easy way to do this?

  • 写回答

1条回答 默认 最新

  • douhuang5623 2012-03-29 19:43
    关注

    Depending on the size of your tables and whether or not you want to be selective about what you move from table1 to table2:

    INSERT INTO table2 (field1,field2,field3)
    SELECT field1,field2,field3 FROM table1
    

    Should to the trick, add orders and where clauses etc as required!

    评论

报告相同问题?

悬赏问题

  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 正弦信号发生器串并联电路电阻无法保持同步怎么办
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)