GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL Plus

 Print  |  
Question:  What is the basic difference between primary key and (unique key along with Not NULL).



May 05, 2008 11:13:38 #9
 ramesh_bollapragada   Member Since: May 2008    Total Comments: 1 

RE: What is the basic difference between primary key and (unique key along with Not NULL).
 
hi every one

differences

1) primary key is defined only on one column where as unique + not null can be defined on many columns

2) we can define the relationship ( master detail relationship) with references to unique+not null column but it is not possible to remove the relationship with

alter table <tablename> primary key cascade. Because Unique + Not null is not exactly primary key

3) When you refer the data dictionery , with unique and not null it is going to create to different constraints where as with primary key it is going to create one constraint.


Regards

Ramesh B
     

 

Back To Question