RE: Data specs of columns

2002-11-15 Thread Miller, Jay
Take a look at dba_cons_columns for primary and foreign key constraints

Jay Miller

-Original Message-
Sent: Friday, November 15, 2002 11:59 AM
To: Multiple recipients of list ORACLE-L


I have a request from a developer to determine if a column is computed,
has a primary key
has a foreign key.

Im looking through the dictionary tables eg user_tab_columns but these
firlds seem to be elusive.

Any ideas what views  to querry ?
Many thanks
bob

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

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
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: Miller, Jay
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
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).



RE: Data specs of columns

2002-11-15 Thread Panicker, Thankam S.
Bob,

Take a look at tables like user_constraints and user_cons_columns - the
constraint_type column would
definitely tell you whether it is a primary or foreign key, I am not sure
about computed.

HTH
Sumathy

-Original Message-
Sent: Friday, November 15, 2002 11:59 AM
To: Multiple recipients of list ORACLE-L


I have a request from a developer to determine if a column is computed,
has a primary key
has a foreign key.

Im looking through the dictionary tables eg user_tab_columns but these
firlds seem to be elusive.

Any ideas what views  to querry ?
Many thanks
bob

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

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
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: Panicker, Thankam S.
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
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).



Re: Data specs of columns

2002-11-15 Thread Igor Neyman
Look at DBA_CONS_COLUMNS

Igor Neyman, OCP DBA
[EMAIL PROTECTED]
  


- Original Message - 
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Friday, November 15, 2002 11:59 AM


I have a request from a developer to determine if a column is computed,
has a primary key
has a foreign key.

Im looking through the dictionary tables eg user_tab_columns but these
firlds seem to be elusive.

Any ideas what views  to querry ?
Many thanks
bob

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

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
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: Igor Neyman
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
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).



RE: Data specs of columns

2002-11-15 Thread Bob Metelsky

 Look at DBA_CONS_COLUMNS
 
 Igor Neyman, OCP DBA
 [EMAIL PROTECTED]
   

I see, thank you

select uc.constraint_type, uc.constraint_name, ucc.column_name,
uc.search_condition
 from user_constraints uc, user_cons_columns ucc
 where uc.owner = 'BOB' and
 uc.constraint_name = ucc.constraint_name and 
 uc.table_name = 'ANAME' ;

#
I'm guessing the computed is not available??

select table_name, comments 
 from dict
where comments like '%comp%' ;


select column_name 
from user_col_comments 
where  column_name like  '%COMPU%' ;

Thanks again
bob



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

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
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).



RE: Data specs of columns

2002-11-15 Thread Bob Metelsky
This is what I ended up doing...

select decode(constraint_type,
 'C', 'Check Constraint', 
 'P', 'Primary Key', 
 'R', 'Foreign Key',
 'U', 'Unique ',
 'V', 'With Check Option for view', 
 'undefined')
  constraint_name, column_name, ucc.table_name
 from user_constraints, user_cons_columns ucc
where ucc.constraint_name = user_constraints.constraint_name ;


  Look at DBA_CONS_COLUMNS
  
  Igor Neyman, OCP DBA
  [EMAIL PROTECTED]

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

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
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).