建立一个过程,提示出错,请看图
想要建立一个存储过程,定期重建索引,代码如下:
CREATE OR REPLACE PROCEDURE XIANGDAN.XD_REBUILDIDX
AS
    BEGIN
    alter index XIANGDAN.IDX_SHIHUAXD_99999_ZHUJIAO rebuild;
    commit;
    alter index XIANGDAN.IDX_SHIHUAXD_99998_ZHUJIAO rebuild;
    commit;
    END;可是提示出错,说
4 2 PLS-00103: 出现符号 "ALTER"在需要下列之一时: begin case declare exit   for goto if loop mod null pragma raise return select update   while with <an identifier>   <a double-quoted delimited-identifier> <a bind variable> <<   close current delete fetch lock insert open rollback   savepoint set sql execute commit forall merge   <a single-quoted SQL string> pipe抓图:
http://hh.cc163.com/0.jpg
请前辈指点,多谢多谢!