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.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will you get by the cursor attribute sql%notfound?

1075


What is the difference between row level and statement level trigger?

1022


What is the difference between an inner and outer join?

1012


What is a left join?

955


what is 'mysqlshow'? : Sql dba

1027


what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba

1072


what is timestamp in mysql? : Sql dba

1078


Can procedure in package be overloaded?

1085


What is a string data type in sql?

1045


What is a join query?

965


How can you fetch common records from two tables?

1063


Why do we use sql constraints? Which constraints we can use while creating database in sql?

1043


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

1154


What is schema in sql?

950


How to order siblings in oracle hierarchy queries?

1047