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  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 219 of 234    Print  
What is the need of primary key as opposed to using not null and unique ?
we can create a column with' not null+unique' with out using primary key


  
Total Answers and Comments: 3 Last Update: July 01, 2008     Asked by: sreeraghava.nara 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: KD09714
 
1) Primary key creates clustered index by default which actually reorders the row in a table based on index while unique key creates non-clustered index.

2) Replication of table possible only if it contains primary key.    

Above answer was rated as good by the following members:
pathakprashant008, suparna.goswami, ksbavv
June 22, 2008 03:57:29   #1  
stshekhar Member Since: June 2008   Contribution: 5    

RE: What is the need of primary key as opposed to using not null and unique ?
One simple diff : there can only one primary key per table but not null+unique can be multiple on one table.
 
Is this answer useful? Yes | No
July 01, 2008 09:46:58   #2  
KD09714 Member Since: June 2008   Contribution: 11    

RE: What is the need of primary key as opposed to using not null and unique ?
1) Primary key creates clustered index by default which actually reorders the row in a table based on index while unique key creates non-clustered index.

2) Replication of table possible only if it contains primary key.

 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
July 01, 2008 09:52:33   #3  
KD09714 Member Since: June 2008   Contribution: 11    

RE: What is the need of primary key as opposed to using not null and unique ?
1) Primary key creates clustered index by default which actually reorders the row in a table based on index while unique key creates non-clustered index.

2) Replication of table possible only if it contains primary key.    

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape