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...

Difference between primary key and unique key ?

Answer Posted / madhumita majhi

In SQL 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 non-clustered index by default.
Another major difference is that, primary key doesn't allow
NULLs, but unique key allows one NULL only.

Unique Key: Identify the row by uniquely, means if you are
inserting a records into the table suppose you already
inserted a record with ID 101 and another record you are
inserting with the same ID then it will give an error
(unique key voilation).

Prmary Key:Once you define a primay key on a particular
column then a column become a mandatory field.That means
you need to insert something on it, you can not leave as a
blank otherwise it will give an error as primary key
voilation.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Library Cache in Oracle?

1070


Are truncate and delete commands same? If so why?

1072


How do I learn what codesets are available in oracle?

996


What is meant by recursive hints in oracle?

1023


how can we store any pdf file in oracle

2093


What is tns service name?

1068


What are a query and state the different types of queries and their uses?

940


How would you best determine why your MVIEW couldnt FAST REFRESH?

1835


What is the use of aggregate functions in oracle?

978


Hi friends can u send the oracle 9i full version download link?????????????? please reply ?

1813


What happens if the imported table already exists?

970


Difference between the “verify” and “feedback” command?

1308


How to start a specific oracle instance?

987


How to select some columns from a table in oracle?

999


If any one has information regarding interview of NIC (National Informatics Centre),it would be of great help...

2183