Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Commands Used to Create Existing Contraint and Index

Re: Commands Used to Create Existing Contraint and Index

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Sat, 31 Jul 2004 10:35:52 +1000
Message-ID: <410ae93e$0$2542$afc38c87@news.optusnet.com.au>

"Michael" <melliott42_at_yahoo.com> wrote in message news:91721cf.0407301542.5db44354_at_posting.google.com...
> Hello,
>
> In an Oracle 8.17 database running on Sun Solaris 8, I have inherited
> the maintinance of a database that may have flaws in the commands used
> to create some Indexes and Constraints.
>
> From SQLPLus (I cannot use any GUI tools in this environment) how can
> I "unengineer" select Indexes and Constraints so as I can recreate
> and\or rewrite them to more accurately meet the business rules?

Not entirely sure I understand the question, but to remove an existing index, you would

drop index blah;

And to remove a constraint, you would

alter table XXX drop constraint blah;

And then to re-create the index, it would be something along the lines of

create index blah on XXX (columnA, columnB);

And similarly:

alter table XXX add (constraint blah primary key (columnA));

And so on.

Or have I missed the point?

Regards
HJR Received on Fri Jul 30 2004 - 19:35:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US