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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: QUERRY DOUBT..

RE: QUERRY DOUBT..

From: Seley, Linda <LSeley_at_IQNavigator.com>
Date: Fri, 25 May 2001 00:23:58 -0700
Message-ID: <F001.0030E9B6.20010525002107@fatcity.com>

Try
this:
<SPAN
class=819191807-25052001> 
select
d.owner, d.table_name,b.constraint_name,b.constraint_type,d.column_namefrom all_tables a,all_constraints b,all_cons_columns c, all_tab_columns dwhere

d.owner = c.owner (+)and d.table_name = c.table_name (+)and 
d.column_name = c.column_name (+)and c.table_name = a.table_name (+)and 
c.table_name = b.table_name (+)and c.constraint_name = 
b.constraint_name(+)and c.owner = a.owner (+)and c.owner = b.owner 
(+)order by d.owner, d.table_name, d.column_id; <SPAN
class=819191807-25052001> 
<SPAN
class=819191807-25052001>HTH
<SPAN
class=819191807-25052001> 
<SPAN
class=819191807-25052001>Linda

  <FONT face=Tahoma
  size=2>-----Original Message-----From: Saurabh Sharma   [mailto:saurabhs_at_fcsltd.com]Sent: Friday, May 25, 2001 12:46   AMTo: Multiple recipients of list ORACLE-LSubject:   QUERRY DOUBT..
  hi all,
 

  i've a querry that is to find out
  what all columns have constraints applied on them. giving the   table_name,column_name,constraint name and constraint type.
 

  the querry goes
  like..
 

  select
  a.table_name,b.constraint_name,b.constraint_type,c.column_namefrom   user_tables a,user_constraints b,user_cons_columns cwhere   a.table_name=b.table_name
  andb.constraint_name=c.constraint_name/
 

  now i need to make a report which
  gives out in the same result all the tables' columns which have constraints   and which have not, both.
  leaving the constraint_type and
  constraint name columns null in the same querry.   is it possible, or do we have
  other alternative to do that.
 

  pls suggest.
  thanks
 

  saurabh
 
 
Received on Fri May 25 2001 - 02:23:58 CDT

Original text of this message

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