Re: more problems with listing pks and fks
Date: 1998/09/17
Message-ID: <6tpohq$e3b$1_at_nnrp1.dejanews.com>#1/1
hi,
In article <6tp3kj$n91$1_at_nnrp1.dejanews.com>,
prochak_at_my-dejanews.com wrote:
> Please show us your query. We are people, not mind readers. The number of
> columns should not affect this at all. The ALL_CONSTRAINTS table doesn't
> even have column information.
this problem comes to me when i want to list the primary key(s) of the tables used in the oracle finance. say, there is a table named mtl_system_items which pk takes 2 columns - organization_id and inventory_item_id (oracle says so). and this is the statment is use to show its constraints:
SELECT constraint_type, COUNT(constraint_type)
FROM all_constraints
WHERE table_name = 'MTL_SYSTEM_ITEMS'
and here is the result:
C COUNT(CONSTRAINT_TYPE)
- ---------------------- C 38
u can see there is no 'P' or 'U' constraint_type in the table. anyway, the table does have an unique index on organizatin_id + inventory_item_id.
thanx!
rgds,
thenard
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Thu Sep 17 1998 - 00:00:00 CEST