Can we able to create an index with the same name as the table name ?
Yes . Because the table and index resides in the different namespaces.
A namespace defines a group of object types, within which all names must be uniquely identified—by schema and name. Objects in different namespaces can share the same name.
These object types all share the same namespace:
• Private synonyms
• Stand-alone procedures
• Stand-alone stored functions
• Materialized views
• User-defined types
So it is impossible to create a view with the same name as a table; at least, it
is impossible if they are in the same schema.
These object types each have their own namespace:
• Database triggers
• Private database links
Thus it is possible for an index to have the same name as a table, even within the
SQL> select namespace from v$librarycache;
11 rows selected.
Here there is an small test:
SQL> create table t1 as select * from user_objects;
SQL> create index t1 on t1(object_id);
SQL> CREATE OR REPLACE package t1 as (ENO VARCHAR2);
CREATE OR REPLACE package t1 as (ENO VARCHAR2);
ERROR at line 1:
ORA-00955: name is already used by an existing object
Here we are getting the error because the packages and tables resides in the same namespace.