楼主的意思是在所有这些表中查询,还是要在指定的表中查询
通过这种方法来连接所有的表进行查询:
select * from (
select * from ProductInfo1
union all
select * from ProductInfo2
...) a
where ....
通过这种方法来连接所有的表进行查询:
select * from (
select * from ProductInfo1
union all
select * from ProductInfo2
...) a
where ....
其功能为....SELECT * INTO 新的Productinfo表 FROM ProductInfo
1>如果多表的结构都相同...可以使用UNION ALL 将多个单表的查询SQL连接起来。
2>如果结构不相同,须看具体情况,来决定是采取多联联合还是其它方式了...