Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to create indexes in PL/SQL block
DDL functions are not allowed in a PL/SQL block. Try using dynamic sql like
the following example.
1 declare
2 v_cursor number;
3 begin
4 v_cursor := dbms_sql.open_cursor;
5 dbms_sql.parse (v_cursor, 'create index asdf on test (col1)',
DBMS_SQL.V7);
6 dbms_sql.close_cursor(v_cursor);
7* end;
Iiro Heiniö <iiro.heinio_at_future121.com> wrote in message
news:5heq3.108$Vm6.13_at_read2.inet.fi...
> Hi!!!
>
> I have a problem with PL/SQL.
> I need to create different indexes for temporary table depending
> on the parameters used to start the PL/SQL block.
> I'm using Server 7.3.3
>
> Thanks in advance
>
>
Received on Thu Aug 05 1999 - 09:06:48 CDT