trigger and alter index

Philip Greenspun's Homepage : Philip Greenspun's Homepage Discussion Forums : 6916 : One Thread
Notify me of new responses
I want to update an index inside a trigger. I tried this:
create or replace trigger stories_modified 
after insert or update on family_stories
begin
	alter index family_stories_ctx rebuild;
end;
But it gave me errors. What is the correct way of doing this? Thanks!

-- Linda Lin, March 6, 2000

Answers

This works:
create or replace trigger stories_modified 
after insert or update on family_stories
begin
    execute immediate 'alter index family_stories_ctx rebuild';
end;


-- C Tran, March 7, 2000