MySQl 合并结构相同的多张表


CREATE TABLE goods_xinxi
        select * from goods_xinxi_0
        UNION ALL
        select * from goods_xinxi_1
        UNION ALL
        select * from goods_xinxi_2
        UNION ALL
        select * from goods_xinxi_3
        UNION ALL
        select * from goods_xinxi_4
        UNION ALL
        select * from goods_xinxi_5

  后续还可以加入多个表,示例只合并6张表

  合并需要用到的函数有 UNION ALL 和 UNION ,不同之处网上有很多介绍。

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM