Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Index on Temp table with data

N_RajOct 3 2019 — edited Oct 4 2019

Hi All,

We have oracle 11.2 on Red hat.

We created temp tables with select clause ,using on commit preserve clause.

Then trying to create index on that temp table but we got an error 

ORA-14452: attempt to create, alter or drop an index on temporary table already in use

We can create the index after truncate the table  only. Even we tried to delete then create index, i did n't work.

1, Is it possible to create index on temp table with data?

2, I closed the session from sqlplus. when i login next time,i can see that temp table.

    Will it drop automatically once closing the session or need to drop manually ?

3, I have used the schema scott. Temp table visible to all the scott user or only who  creating the table in that session   

Any suggestions.

Thanks & Regards,

Comments
Post Details
Added on Oct 3 2019
4 comments
993 views