Helmut

ALL_CONS_COLUMNS contains columns and position for each constraint.
Similarly ALL_IND_COLUMNS contains columns for each index.

If you need to find the columns through SQL, use the views or join to them. If
you don't need the SQL, get a tool like TOAD (free version,
http://www.toadsoft.com) and you can find a lot through database - Schema
Browser

HTH

Witold






"Helmut Daiminger" <[EMAIL PROTECTED]> on 05/10/2001 14:22:34

Please respond to [EMAIL PROTECTED]

To:   Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
cc:    (bcc: Witold Iwaniec/ATL_BLUECROSS_CA)



Hi!

Is there a data dictionary view that gives me all the columns in a primary
key of a table?

I can query user_constraints to find out about all constraints on a table:

select * from user_constraints where table_name='TBACCOUNTS'


OWNER      CONSTRAINT_NAME     C TABLE_NAME   SEARCH_CONDITION
---------- ------------------- - ------------ -------------------------
VIVOUSER   SYS_C003011         C TBACCOUNTS   "COMPANYID" IS NOT NULL
VIVOUSER   SYS_C003012         C TBACCOUNTS   "STORELOCID" IS NOT NULL
VIVOUSER   SYS_C003013         C TBACCOUNTS   "ACCOUNTID" IS NOT NULL
VIVOUSER   PK_ACCOUNTS         P TBACCOUNTS

How can I get what columns are in the primary key "PK_ACCOUNTS" ? I have
more NOT NULL columns in the table than in the PK.

Any idea?

This is 8.1.6 on Win2k.

Thanks,
Helmut

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Helmut Daiminger
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).






-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to