Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help (2nd request) with determining parent key foreign key relationship
In <8daca8eb.0108090930.6e6aa090_at_posting.google.com> j_p_x_at_hotmail.com (OK) writes:
>1. My previous scripts list ALL FOREIGN KEY columns, not PK cols.
OK, my misunderstanding.
>2. It works no matter how many FKs a table has.
Yes, I had figured that out, and amended my post.
>3. I simplified a little bit, it gives out all the info for sys schema
>in less than 1 sec.
Much faster!
>4. To list the PK cols, you only need to do slightly modification (see
>below).
>5. For DBA, I still think the 2nd one is much, much userful.
Perhaps, but this is for use in a script to be run by non DBA's.
>Here is the output:
>Enter the table name check for foreign key: bonus
>FK Column Name PK Table Name PK Column Name
>-------------------- ------------------------- --------------------
>DEPTNO DEPT DEPTNO
>EMP_NAME, EMP_ID EMP ENAME, EMPNO
Perfct!
Thanks very much for the help! also thanks for the patience with me. Received on Thu Aug 09 2001 - 12:54:19 CDT