This is a discussion on ROWIDs in Views within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Hi, i have a question: Some Views i have created have (internal) a rowID, others not. In what cases ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Jun 27, 10:45 am, "Micha" <p...@gmx.li> wrote: > Some Views i have created have (internal) a rowID, others not. > In what cases wil they create and in what cases not? Views are just stored queries. If you select rowid from a "simple" view that has one-to-one relationship with underlying table data (key- preserved) then you wil get it. But if you try to do a select rowid from view with distinct, group by, etc you will get error: ORA-01446: cannot select rowid from view with DISTINCT... (Cause: A SELECT statement attempted to select ROWIDs from a view containing columns derived from functions or expressions. Because the rows selected in the view do not correspond to underlying physical records, no ROWIDs can be returned. ) |