Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: query help
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01BFBBF2.DEF111B0
Content-Type: text/plain
Try these query
SELECT a.constraint_name, b.pt, b.pc, a.ct, a.cc FROM (
SELECT constraint_name, table_name ct, column_name cc FROM user_cons_columns WHERE constraint_name IN(SELECT constraint_name FROM user_constraints WHERE constraint_type like 'R'))a, ( SELECT constraint_name, table_name pt, column_name pc FROM user_cons_columns WHERE constraint_name IN (SELECT r_constraint_name FROM user_constraints WHERE constraint_type like 'R'))bRegards,
-----Original Message----- From: gfaktor_at_ecal.com [SMTP:gfaktor_at_ecal.com] Sent: Thursday, May 11, 2000 9:29 AM To: Multiple recipients of list ORACLE-L Subject: query help Hi All! I need write query to receive following info from data dictionary: ---------------------------------------------------------------------------- -------------- Constaraint_Name | Parent_Table | Parent_Column | Child_Table | Child_Column ---------------------------------------------------------------------------- -------------- for all foreign keys. Thanks. Greg. -- Author: Gregory Faktor INET: gfaktor_at_ecal.com 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: ListGuru_at_fatcity.com (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).
------_=_NextPart_001_01BFBBF2.DEF111B0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =charset=3Dus-ascii">
<TITLE>RE: query help</TITLE> </HEAD> <BODY>
<P><FONT SIZE=3D2 FACE=3D"Arial">Try these query</FONT> </P>
<P><FONT SIZE=3D2 FACE=3D"Arial">SELECT a.constraint_name, b.pt, b.pc, =
a.ct, a.cc</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">FROM (</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
SELECT constraint_name, table_name ct, column_name cc</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
FROM user_cons_columns</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
WHERE constraint_name IN(SELECT constraint_name</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nb= sp; &nb= sp; =FROM user_constraints</FONT> <BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nb= sp; &nb= sp; =WHERE constraint_type like 'R'))a,</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial"> = (</FONT>
FACE=3D"Arial"> &nb= sp; &nb= sp; =FROM user_constraints</FONT> <BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nb= sp; &nb= sp; =WHERE constraint_type like 'R'))b</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Regards,</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">VMS</FONT> </P> <UL> <P><A NAME=3D"_MailData"><FONT SIZE=3D2 FACE=3D"Arial">-----Original =Message-----</FONT></A>
<P><FONT SIZE=3D2 FACE=3D"Arial">Hi All!</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">I need write query to receive = following info from data dictionary:</FONT> <BR><FONT SIZE=3D2 =
FACE=3D"Arial">---------------------------------------------------------= -------------------</FONT>
FACE=3D"Arial">---------------------------------------------------------= -------------------</FONT>
<P><FONT SIZE=3D2 FACE=3D"Arial">for all foreign keys.</FONT> </P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks.</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Greg.</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">-- </FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">Author: Gregory Faktor</FONT><BR><FONT SIZE=3D2 FACE=3D"Arial"> INET: gfaktor_at_ecal.com</FONT> </P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Fat City Network =
Services -- (858) 538-5051 FAX: (858) =
538-5051</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">San Diego, =
California -- Public Internet =
access / Mailing Lists</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">---------------------------------------------------------=-----------</FONT>
![]() |
![]() |