首先,同样结构的表分成这么多,设计思路就有问题,为什么不用一个表?在现在的情况下,生成一个view,再对view做查询,应该是最简单的办法了 create or replace view tab_total as select * from tab20040101 union all select * from tab20040102 union all select * from tab20040103 ..../select action from tab_total where name='TOM';
create or replace view tab_total as
select * from tab20040101
union all
select * from tab20040102
union all
select * from tab20040103
..../select action from tab_total where name='TOM';