This discussion is archived
1 2 Previous Next 16 Replies Latest reply: Dec 31, 2012 2:08 AM by jeneesh Go to original post RSS
  • 15. Re: Materialized view and Table
    ranit B Expert
    Currently Being Moderated
    Sorry and apologies to all...

    Previously, I wrote the below (which is not complete true):
    And Yes , you can have have a common name for both a MView and its base table.
    If you check DBA_OBJECTS properly, there are 2 separate columns - OBJECT_NAME and OBJECT_TYPE

    The latter col distinguishes between them, even though the former col is same.
    As Jeneesh already demonstrated, creating a MView with same name as of an existing table is not possible.
    I just tried it on my machine and got the reason (which is quite obvious).

    Suppose you have a table 'X'.
    Whenever an MView is created, 2 objects are formed - a MView and a Table; Both of same name.

    In that case, if an MView with name 'X' is created, a new table of name 'X' will try to get created which already exists. This is the cause of error.
    from dba_objects
    Upper(object_name) like 'X';
    Hope this is clear.
  • 16. Re: Materialized view and Table
    jeneesh Guru
    Currently Being Moderated
1 2 Previous Next


  • Correct Answers - 10 points
  • Helpful Answers - 5 points