Re: Index creation using a script
From: Charles Dye <cdye_at_dnt.dialog.com>
Date: 1996/05/24
Message-ID: <4o52k1$sba_at_iserv.dnt.dialog.com>#1/1
Date: 1996/05/24
Message-ID: <4o52k1$sba_at_iserv.dnt.dialog.com>#1/1
In article <31A5E52D.68A0_at_macromedia.com>, Rich Headrick <rheadric_at_macromedia.com> writes:
> 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
Rich,
get into sqlplus as the schema owner.
set head off
set feedback off
spool buildidx.sql
SELECT 'create index i_' ||table_name|| '_row_id on ' || table_name || '(row_id);'
FROM user_table
/
spool off
_at_buildidx
-- Chas. Dye Oracle Database Administrator Charles_Dye_at_krinfo.comReceived on Fri May 24 1996 - 00:00:00 CEST