This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL SERVER - Discussion - Effect of Missing Identity on System - Real World Scenario

SQL SERVER – Discussion – Effect of Missing Identity on System – Real World Scenario

August 11, 2009
Pinal Dave
SQL Puzzle
Database, DBA, SQL Constraint and Keys, SQL Index

Is there any real world reason to list a missing identity in a table? Readers had no new script, but a lively discussion on whether gaps matter.

Read More
A hand fits a brass hinge pin while matching spare pins lie on the bench.

Finding Duplicates Before Adding a Unique Constraint

July 27, 2009
Pinal Dave
SQL Tips and Tricks
Duplicate Records, Ranking Functions, SQL Constraint and Keys, SQL Group By, SQL NULL

A unique constraint fails on the first duplicate it meets and tells you about only one. Here is how to list them all and clean up safely.

Read More
Generate primary and foreign keys.

SQL SERVER – Puzzle – Write Script to Generate Primary Key and Foreign Key

July 23, 2009
Pinal Dave
SQL Puzzle
SQL Constraint and Keys, SQL Scripts

A puzzle from a migration project: SSMS cannot script every Primary Key and Foreign Key at once. Can you write a script that generates them all?

Read More
SQL SERVER - Two Methods to Retrieve List of Primary Keys and Foreign Keys of Database

SQL SERVER – Two Methods to Retrieve List of Primary Keys and Foreign Keys of Database

July 17, 2009
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Scripts, SQL Server

There are two different methods to retrieve the list of Primary Keys and Foreign Keys from the database.

Read More
Two separate library shelving units with a narrow aisle between them, one holding bound books and the other holding only card index drawers.

SQL SERVER – Clustered Index on Separate Drive From Table Location

June 18, 2009
Pinal Dave
SQL Performance
Best Practices, SQL Constraint and Keys, SQL Index, SQL Server

A Jr. developer asked if a clustered index can live on a separate Drive from its table. The answer is no, and the clustered vs non clustered difference shows why.

Read More
Two forks, one red, pressing into the last slice of pie at the same moment

Preventing Overbooking When Two Sessions Grab the Last Seat

June 9, 2009
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Lock, SQL Server, SQL Transactions, Transaction Isolation

Learn preventing overbooking through a last-seat race, an atomic update, update locks, and a database constraint that rejects oversold inventory.

Read More
SQL SERVER - Difference Between Candidate Keys and Primary Key

SQL SERVER – Difference Between Candidate Keys and Primary Key

May 30, 2009
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Function, SQL Scripts

What is the difference between a candidate key and a primary key? A table can have many candidate keys, but only one of them becomes the primary key.

Read More
Previous 1 … 13 14 15 16 17 18 19 … 23 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com