Re: Oracle command

From: corrado brambilla <corrado.brambilla_at_iol.it>
Date: Wed, 07 Feb 2001 08:31:53 +0100
Message-ID: <3A80F9E9.9A408BAB_at_iol.it>


2. What is the Oracle command for listing the constraints? I tried "DESCRIBE" but it does not give me all the useful information that I want.

  • Select rows from table 'all_constraints'.

Hi Corrado

Matthew wrote:

> Hi,
>
> I am a novice in Oracle SQL.
> I was taught to use the following SQL to create table and its key
> constraints
> "CREATE TABLE EMPLOYEE
> (ID CHAR(9) NOT NULL,
> NAME CHAR(40) NOT NULL,
> ...
> CONSTRAINT EMPPK
> PRIMARY KEY (ID),
> CONSTRAINT EMPFK
> FOREIGN KEY (NAME) REFERENCES
> DEPARTMENT_TABLE(NAME));"
>
> I will like to ask the following the questions:
> 1. What is the use of naming the constraints, ie, naming the primary key and
> foreign key? How do I make use of them?
> 2. What is the Oracle command for listing the constraints? I tried
> "DESCRIBE" but it does not give me all the useful information that I want.
>
> regards
> Matthew
Received on Wed Feb 07 2001 - 08:31:53 CET

Original text of this message