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 ,不同之处网上有很多介绍。
浙公网安备 33010602011771号