Re: Index creation using a script
Date: 1996/06/12
Message-ID: <31BE4979.19D5_at_pop.ke.sanet.sk>#1/1
Michel Lalonde wrote:
>
> In article <31A5E52D.68A0_at_macromedia.com> Rich Headrick <rheadric_at_macromedia.com> writes:
> >From: Rich Headrick <rheadric_at_macromedia.com>
> >Subject: Index creation using a script
> >Date: Fri, 24 May 1996 09:34:53 -0700
> >Greetings,
> >I need to create indexes on 440 tables in the same schema. Each table
> >has a column name row_id, upon which I need to create the index.
> >Storage contraints aren't important right now. What I need is a script
> >which will process each table in the schema, and create the index on
> >the column row_id.
> >Any and all suggestions appreciated
> >Rich
>
> spool xxx.sql
> select 'create index i'||table_name||' on '||table_name||'(row_id);'
> from user_tables;
> spool off
>
> then just clean the script and execute it.
>
> Michel lalonde.
Try:
sqlplus
select 'create index i_'||table_name||' on '||table_name||
'(row_id);' from tabs;
spool x
/
spool off
_at_x.lst
Peter. Received on Wed Jun 12 1996 - 00:00:00 CEST