Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle SQL Questions

Re: Oracle SQL Questions

From: Dean Lai-How <deanlh_at_intergate.bc.ca>
Date: Fri, 12 Feb 1999 16:08:14 -0800
Message-ID: <7a2fr7$34n$1@discovery.intergate.bc.ca>

Morris Wong wrote in message <36C479B1.95100D45_at_netvigator.com>...

>1. I find that i can modify a column to "NOT NULL" even

> the column is the primary key of the table. What is
> the intention? Is it used in case of complex primary
> key?

This might help you answer your question, if I understood your question correctly.

I believe that the primary key can't contain null values. By using:

        ALTER TABLE emp
        MODIFY (column_empno, number, NOT NULL);
you have specified that the column_empno - which is your primary key - can't contain null values because a foreign key is usually referenced to that primary key (or a unique key). The specified NOT NULL used here, is a constraint rather than a value.

Regards,
Dean Received on Fri Feb 12 1999 - 18:08:14 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US