Can we create index on views?

Answer Posted / md sajjad

No We cannot create index on view:
e.g
1* create view emp_view as select * from emp where
deptno=20
SQL> /

View created.


1* create index indx_emp on emp_view(empno)
SQL> /
create index indx_emp on emp_view(empno)
*
ERROR at line 1:
ORA-01702: a view is not appropriate here

Is This Answer Correct ?    39 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to execute the package in oracle?

561


I have a table called 'test' on source and target with same name, structure and data type but in a different column order. How can you setup replication for this table?

614


How to define a data field as not null?

626


How to sort output in descending order in oracle?

566


What is the recommended interval at which to run statspack snapshots, and why?

2428






How many data types are supported?

608


What do you mean by merge in oracle?

587


Is oracle a language?

512


Explain what are clusters?

604


What is the difference between a user and a schema in oracle?

550


How to invoke the data pump export utility?

553


How to connect ms access to oracle servers?

540


How to connect asp pages to oracle servers?

565


What are the uses of a database trigger?

509


1) What is ONE_SIZE_FITS_ALL approach? 2) Explain the Common & Variable Header of DATA FILE? 3) What are the Drawbacks to using OMF DB? and the Advantages? 4) List out the Advantages of Undo T.spaces over the Undo SEGMENT? 5) Difference between the Temporary tablespace with TEMPFILE and the Tablespace with TEMPORARY Keyword? 6) What are the situation extents are freeing for reuse.

1597