ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
What's the difference between a primary key and a unique 
key?
 Question Submitted By :: Swapna
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What's the difference between a primary key and a unique key?
Answer
# 1
Both primary key and unique enforce uniqueness of the 
column on which they are defined. But by default primary 
key creates a clustered index on the column, where are 
unique creates a nonclustered index by default. Another 
major difference is that, primary key doesn't allow NULLs, 
but unique key allows one NULL only.
 
Is This Answer Correct ?    8 Yes 0 No
Swapna
 
  Re: What's the difference between a primary key and a unique key?
Answer
# 2
There is one more diff b/w primary key and unique key that 
there is only one primary key in a table but there are more 
then one unique keys in a table.
 
Is This Answer Correct ?    4 Yes 1 No
Ramneet
 
 
 
  Re: What's the difference between a primary key and a unique key?
Answer
# 3
Primary can be used in foregin key but unique key does not 
used.
 
Is This Answer Correct ?    3 Yes 0 No
Ramneet
 
  Re: What's the difference between a primary key and a unique key?
Answer
# 4
1)primary key uses clustered index
unique key uses non-clustered index

2)primary key doesn't allow null values
but unique allows one null value

3)there is only one primary key but more than one unique 
keys
 
Is This Answer Correct ?    2 Yes 0 No
Gowthami Radhakrishnana
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
Let us say master db itself has no backup. Now you have to rebuild the db so what kind of action do you take?  1
How do we get current date in SQL Server 2000, Oracle, MS Access?  11
What are sub-queries? Give example? In which case sub-queries are not feasible? Infosys3
How will oyu test the stored procedure taking two parameters namely first name and last name returning full name?  3
Please get the 4 th maximum salary from a table without using any sql keyword (TOP,MAX are mot allowed)  5
What is a Linked Server?  1
What types of integrity are enforced by a foreign-key constraint  1
How to write a script for upate the data in prod , i have 50000 row are there TCS2
What is database replicaion? What are the different types of replication you can set up in SQL Server? HCL4
how will u create "n" possible tables in sql... Oracle1
How will u find the query which is running in some other machine IBM2
Can we call SP inside a query? Wipro4
What is an execution plan? When would you use it? How would you view the execution plan?  1
what are the problems in logshipping?  2
can anyone explain me the concept of Serialization in Detail and Clear? plz its urgent i have interview on friday (15th feb)  1
Difference between Function and Stored Procedure? C1-India4
which one will take 1st priority in case of insert statement and select statement???  1
What is normalization in Database ?  4
1.what is the difference between view and cursor? 2.If we do any change in view will it affect the database,similarly when we do changes in cursor will it affect the databse?with certain example?Thanks  3
What are the different types of replication? How are they used?  3
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com