What's the difference between a primary key and a unique key? | SansSQL

Thursday, June 12, 2008

What's the difference between a primary key and a unique key?

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.

4 comments:

blackmask said...

Rideshare accident lawyers are essential for protecting your rights after an Uber or Lyft crash. They know how to gather evidence, speak with witnesses, and motorcycle accident lawsuit work with accident reconstruction experts. Their legal strategies increase your chances of a successful claim and help you focus on recovery without the stress of legal battles.

blackmask said...

Data utilization strengthens strategic outcomes. These partners guide how to collect, manage, and analyze information to uncover trends, monitor performance, and it support it drive improvements that are measurable and aligned with business goals.

blackmask said...

Family cabins and lodges gain character from personalized gear. Placing a uniquely marked bone handle tool in a communal space tells stories of shared holidays, teamwork, and traditions built over seasons spent together.

blackmask said...

App-based ride-hailing services are adding green filters to their platforms. Users can now select electric or taxi dunfermline hybrid vehicles when booking a ride, empowering them to make environmentally responsible decisions with ease.

Post a Comment

Ads