Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Commands Used to Create Existing Contraint and Index
"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