UrbanPro
true

Learn MS SQL from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Primary Key VS Unique Key In Database.

Umasankar Natarajan
14/06/2017 0 0
PRIMARY KEY UNIQUE KEY
Primary key is a set of one or more fields/columns of a table that uniquely identify a record in database table. Primary keys must contain unique values. Unique-key is to prevent duplicate values in a column. prevents two records from having identical values in a column.
There will be only one PRIMARY KEY per table. There may be more that one UNIQUE KEY per table.
Should not have a NULL value. Can have a NULL value.
Unique key identifier of the record. May not be unique.
By default, creates clustered index. Creates non-clustered index.
Values can’t change or delete. Values can change or delete.
Can be made into a foreign key into another table. Can not be made into a foreign key into another table.

 

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

10 Cool SQL Optimizations That Do Not Depend On The Cost Model
Today, we don’t want to talk about cost based optimisation, i.e. optimisations that depend on a database’s cost model. We’ll look into much simpler optimisations that can be implemented...

Understanding Indexes In SQL Server
Indexes in SQL Server are created on columns in tables or views. The index provides a faster way to look up data based on the values in those columns.For example, if you create an index on the primary...

MS Access - DAO (Data Access Object)
DAO is a well-known, easy to use object model for database services, including Microsoft Jet, ODBC, and in the future, OLE DB. DAO is also multi-lingual-you can use it from VB and VBA environments, FoxPro,...

SQL (Structured Query Language)
SQL (Structured Query Language) is a standardized programming language used for managing relational databases and performing various operations on the data in them. Initially created in the 1970s, SQL...

What Are Olap, Molap, Rolap, Dolap, Holap?
1. OLAP: On-Line Analytical Processing: Designates a category of applications and technologies that allow the collection, storage, manipulation and reproduction of multidimensional data, with the goal...
X

Looking for MS SQL Classes?

The best tutors for MS SQL Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn MS SQL with the Best Tutors

The best Tutors for MS SQL Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more