Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between UNIQUE CONSTRAINT and
PRIMARY KEY?

1. There is no difference.
2. A PRIMARY KEY cannot be declared on multiple columns.
3. A UNIQUE CONSTRAINT cannot be declared on multiple
columns.
4. A table can have multiple PRIMARY KEYS but only one
UNIQUE CONSTRAINT.
5. A table can have multiple UNIQUE CONSTRAINTs but only
one PRIMARY KEY.

Answers were Sorted based on User's Feedback



What is the difference between UNIQUE CONSTRAINT and PRIMARY KEY? 1. There is no differen..

Answer / sdp

A table can have multiple UNIQUE CONSTRAINTs but only
one PRIMARY KEY.

Is This Answer Correct ?    21 Yes 1 No

What is the difference between UNIQUE CONSTRAINT and PRIMARY KEY? 1. There is no differen..

Answer / radhika

A table can hava multiple Unique constraints but only one
primary key.

Is This Answer Correct ?    16 Yes 1 No

What is the difference between UNIQUE CONSTRAINT and PRIMARY KEY? 1. There is no differen..

Answer / rajesh.m

There is no difference.
The One & only Difference is a UNIQUE would allow Null
Values where as The Primary Key Not.

Is This Answer Correct ?    15 Yes 2 No

What is the difference between UNIQUE CONSTRAINT and PRIMARY KEY? 1. There is no differen..

Answer / andsens

Fields in UNIQUE CONSTRAINTs can be NULL. They cannot with PRIMARY KEYs.
You can define more than one UNIQUE KEY in a table.
Because of this, the behaviour of UNIQUE CONSTRAINTs is very different from PRIMARY KEY constraints. As long as one of the fields in a UNIQUE CONSTRAINT is NULL the constraint itself does not apply and you can set the other fields to whatever you want without getting an error.

Is This Answer Correct ?    7 Yes 0 No

What is the difference between UNIQUE CONSTRAINT and PRIMARY KEY? 1. There is no differen..

Answer / sunitha

yes, i agree with Rajesh ,primary key constraint doesn't allow null values but unique constraint allows null values.this is the main difference .

Is This Answer Correct ?    0 Yes 0 No

What is the difference between UNIQUE CONSTRAINT and PRIMARY KEY? 1. There is no differen..

Answer / vikneswaran

1) primary key don't allow null values but unique const
allow null values
2)we can declare primary key as multiple column. but table
should have one primary key
3)we can declare unique as multiple column. but table should
have one unique key
4) and 5)

in table we can create multiple column of primary key and
multiple column of unique. but only the restriction is in
table should have one primary key and one unique key .. if
it is neccessary.

Is This Answer Correct ?    1 Yes 2 No

What is the difference between UNIQUE CONSTRAINT and PRIMARY KEY? 1. There is no differen..

Answer / chandrasekar.ramasamy

A table can have compite primarykey but only one unique
constraint

Is This Answer Correct ?    0 Yes 15 No

Post New Answer

More SQL PLSQL Interview Questions

IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS NULL VALUES AND DUPLICATE VALUES..INSTEAD OF PRIMARY KEY WHY CANT WE USE UNIQUE AND NOT NULL.THESE TWO ALSO DOESNT ACCEPT NULL VALUES IN NOT NULL AND UNIQUE DOESNT ACCEPT DUPLICATE VALUES? SO WHAT IS THE DIFEERENCE BETWEEN(UNIQUE,NOT NULL) AND PRIMARY KEY??????

8 Answers   rsystems,


What is a trigger ?

11 Answers   Accenture, BirlaSoft,


How will we see framework of a table?

2 Answers   Accenture,


check whether all the emp numbers are indeed unique.

6 Answers  


can i call procedure in package

3 Answers   TCS,


What is query optimization in sql?

0 Answers  


what is the difference between char and varchar data types? : Sql dba

0 Answers  


Is sql microsoft?

0 Answers  


hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews

0 Answers  


Can function return multiple values in sql?

0 Answers  


what are the advantages and disadvantages of cascading style sheets? : Sql dba

0 Answers  


How packaged procedures and functions are called from the following?

2 Answers  


Categories