Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ROWID and Views - Problem?
apollopaulr_at_my-dejanews.com wrote:
>
> Is it valid to query a view on ROWID when the view is a UNION of multiple
> tables having the same structure?
A view as such has no rowid. It's just a stored query, reexecuted each time. The only real rowids are those of the underlying tables, and I am afraid that Oracle is not clever enough to extrapolate what you want. You should rewrite your view as
create or replace view one_year(row_id, col1, ... coln)
as
select rowid, col1, ... coln
from table1
union
...
select rowid, col1, ... coln
from table12
--
Regards,
Stéphane Faroult
Oriole Corporation