> 
> Dear Ari,
> 
> Thanx for ur replies to misc. questions:
> 
> I have few queries:
> 
> 1. HOST COMMAND:
> ------------------------
> 
> HOST command which works well under Win311 and WinNT does not seem to
> work
> under Win 95.  When issued, it comes out with the message:
> 
> Command not success.
> 
> When we run PLUS33.EXE instead of PLUS33W.exe, it shows:
> 
> Incorrect DOS Version
> Command not success
> 

You need to be sure to use the proper installation CD-Rom. All three usually
are on the same CD and it usually auto-detects the operating system. Try
re-installing SQL*Plus with all windows closed.

> 2. UNIQUE constraint:
> -----------------------
> 
>   How to find whether a unique constraint exists for a given column in a
> table?
> 
> Thanks in advance for ur answers.
> 
> -SrinivasanR
>  Chennai, India.
For unique constraints, type:

SELECT CONSTRAINT_NAME
FROM USER_CONSTRAINTS
WHERE TABLE_NAME=table_name
  AND CONSTRAINT_TYPE IN ('U','P');

This will give you all Unique and Primary keys for the table.

To find their indexes, you can type:

SELECT * FROM USER_IND_COLUMNS WHERE INDEX_NAME = index_name;

Or you can combine the above two:

SELECT * FROM USER_IND_COLUMNS WHERE INDEX_NAME IN
       (SELECT CONSTRAINT_NAME FROM USER_CONSTRAINTS
        WHERE TABLE_NAME=table_name AND
              CONSTRAINT_TYPE IN ('U','P') );

Best of luck and namaste...


-Ari Kaplan
Independent Oracle DBA Consultant

<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
<-> For 160+ Oracle tips, visit my Web Page:                      <->
<->                                                               <->
<->             www.arikaplan.com                                 <->
<->                                                               <->
<->             email: akaplan@interaccess.com                    <->
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->

Back to Ari Kaplan's Home Page "18"> Back to Ari Kaplan's Home Page