Home » RDBMS Server » Server Administration » dropping all indexes on the table
dropping all indexes on the table [message #54070] Mon, 28 October 2002 09:35 Go to next message
Eugene
Messages: 44
Registered: August 2001
Member
Hi all,
I am selecting index_name from all_indexes into a vIndex_name and then trying to use the following code, but it dosn't work:
IF vIndex_name <> ' ' THEN
EXECUTE IMMEDIATE ''''||'DROP INDEX'||' '||vIndex_name||''''
END IF;

I am getting "invalid sql statement".
Why doesn' it work?

Thanks,
Re: dropping all indexes on the table [message #54071 is a reply to message #54070] Mon, 28 October 2002 09:43 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
try this
EXECUTE IMMEDIATE ('drop index '||vIndex_name);

Re: dropping all indexes on the table [message #54073 is a reply to message #54070] Mon, 28 October 2002 10:10 Go to previous message
Eugene
Messages: 44
Registered: August 2001
Member
Thanks Mahesh,
It worked just fine for me.

Eugene
Previous Topic: ORA-12515: TNS:listner could not find a handler for this presentation
Next Topic: urgent
Goto Forum:
  


Current Time: Fri Sep 20 05:36:13 CDT 2024