GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  Basics
Go To First  |  Previous Question  |  Next Question 
 Basics  |  Question 2 of 49    Print  
what is the difference between primary key, unique key, sorrougate key?

  
Total Answers and Comments: 43 Last Update: November 13, 2009   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: suresh
 
primaruy key should not dontain nulls and 
unique key can contains null values

Above answer was rated as good by the following members:
exilant123, prashantmirje2000, divya.alw
  Sorting Options  
  Page 1 of 5   « First    1    2    3    >     Last »  
August 16, 2005 09:43:49   #1  
nagaa        

RE: what is the difference between primary key, unique key, sorrougate key?
what is the difference b/w rownum and rowid?
 
Is this answer useful? Yes | No
August 25, 2005 16:23:38   #2  
Nimi        

RE: what is the difference between primary key, unique key, sorrougate key?
To answer your question its sufficient enough to understand their definitions.

Primary Key: A column in a table whose values uniquely identify the rows in the table. A primary key value cannot be NULL.

Unique Key: Unique Keys are used to uniquely identify each row in an Oracle table. There can be one and only one row for each unique key value.

Surrogate Key: A system generated key with no business value. Usually implemented with database generated sequences.

 
Is this answer useful? Yes | No
August 26, 2005 13:38:02   #3  
Archit Dave        

RE: what is the difference between primary key, unique key, sorrougate key?
i have one question is that

what are the differences between primary key and unique key

 
Is this answer useful? Yes | No
August 27, 2005 00:52:49   #4  
vandita        

RE: what is the difference between primary key, unique key, sorrougate key?
we can refer the primary key value in some other table ie child table.
 
Is this answer useful? Yes | No
August 27, 2005 03:36:56   #5  
suresh        

RE: what is the difference between primary key, unique key, sorrougate key?
primaruy key should not dontain nulls and
unique key can contains null values

 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
September 20, 2005 09:33:02   #6  
Vijay Raj Jaiswal        

RE: what is the difference between primary key, unique...

Primay Key Unique key

----------- ------------------

1.There is only one there may be more than 1
Primary key for Unique Key in table
1 table

2.It can contain It Can contain Null Value
Null value


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 2Overall Rating: -1    
September 30, 2005 02:42:29   #7  
gomathi.e        

RE: what is the difference between primary key, unique...
unique key - allowes NULL ValuesPrimary Key - not allowed The NULL values
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
October 16, 2005 03:14:57   #8  
chandrakant        

RE: what is the difference between primary key, unique key, sorrougate key?

nagaa Wrote: what is the difference b/w rownum and rowid?

what is the difference between primary key unique key sorrougate key?

3how


 
Is this answer useful? Yes | No
October 18, 2005 04:57:59   #9  
PSRaja        

RE: what is the difference between primary key, unique...
send me the differences bet unique key & primary key
 
Is this answer useful? Yes | No
November 23, 2005 01:58:08   #10  
santhi        

RE: what is the difference between primary key, unique...

both primary key and unique key doesn't have duplicate values. but there will be only primary key in a table and u can have any number of unique keys.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
  Page 1 of 5   « First    1    2    3    >     Last »  


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape