[techtalk] Re: Oracle/SQLPlus
Parr, Colin
Colin.Parr at isd.treasury.gov.im
Mon Jul 3 10:27:13 EST 2000
You'll find a table user_constraints in your database. If you desc that you
get :
SQL> desc user_constraints;
Name Null? Type
------------------------------- -------- ----
OWNER NOT NULL VARCHAR2(30)
CONSTRAINT_NAME NOT NULL VARCHAR2(30)
CONSTRAINT_TYPE VARCHAR2(1)
TABLE_NAME NOT NULL VARCHAR2(30)
SEARCH_CONDITION LONG
R_OWNER VARCHAR2(30)
R_CONSTRAINT_NAME VARCHAR2(30)
DELETE_RULE VARCHAR2(9)
STATUS VARCHAR2(8)
So if you select say, contraint_name, contraint_type etc for the table you
want you'll see primary keys as type 'P', foreign keys as type 'R' etc.
Can't help with the Unix reference other than the 8i documentation CD might
have an overview somewhere.
Ta ra
Colin.
>Message: 2
>Date: Fri, 30 Jun 2000 13:34:01 -0400 (EDT)
>From: "Becky L. Norum" <bnorum at coe.neu.edu>
>To: techtalk at linuxchix.org
>Subject: [techtalk] ? re Oracle/SQLPlus
>
>I'm trying to teach myself something about Oracle for school. I've
>started working with the book Oracle8 Programming: A Primer by
>Sunderraman, which seems prety descriptive and good. However, I'm having
>a couple of problems/questions that I just cannot seem to find answers for
>anywhere:
>
>- how does one show the primary and foreign keys and the referential
>constraints for tables?
>
>
>- is there any very BASIC resource that you could recommend that would
>serve as a primer for the structure/organization of Oracle on a UNIX
>system? Most of the guides out there seem to be for professional DBAs/ppl
>who have prior database administration experience, which I do not have
>(MSAccess is the extent of my database experience - I have to use it for
>work.)
>
>Thanks for your help,
>
>Becky
>bnorum at coe.neu.edu
More information about the Techtalk
mailing list