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
An intact stone arch with a keystone supporting the structure

Does Dropping Clustered Index Drop Primary Key on the Same Column? – Interview Question of the Week #083

August 7, 2016
Pinal Dave
SQL Interview Questions and Answers
Clustered Index, SQL Constraint and Keys, SQL Index, SQL Server

Does dropping clustered index also drop the primary key on the same column? Here is the short answer, a follow-up to last week’s question on the reverse case.

Read More
Two linked copper loops beside a separate opened loop

Does Dropping Primary Key Drop Clustered Index on the Same Column? – Interview Question of the Week #082

July 31, 2016
Pinal Dave
SQL Interview Questions and Answers
Clustered Index, SQL Constraint and Keys, SQL Index, SQL Server

When you drop a primary key, does it drop the clustered index on the same column too? Yes, it does. Here is a small script that shows it.

Read More
Distinct brass keys each occupy their required place in a wooden organizer

Can We Have NULL Value in Primary Key? – Interview Question of the Week #075

June 12, 2016
Pinal Dave
SQL Interview Questions and Answers
SQL Constraint and Keys, SQL NULL, SQL Scripts, SQL Server

Can we have a NULL value in primary key columns? No. The primary key has to uniquely identify each row, and NULL cannot do that. Here is why.

Read More
Every place in an egg carton contains an egg

What is NOT NULL Constraint? – Interview Question of the Week #073

May 29, 2016
Pinal Dave
SQL Interview Questions and Answers
SQL Constraint and Keys, SQL NULL, SQL Scripts, SQL Server

A client table full of NULL values was hurting query plans. Here is what a NOT NULL constraint is, how to add one and why it helped performance.

Read More
Cabinet doors with their individual keys and one conspicuously empty key recess

Primary Key and Null in SQL Server – Interview Question of the Week #071

May 15, 2016
Pinal Dave
SQL Interview Questions and Answers
SQL Constraint and Keys, SQL Scripts, SQL Server

Can a primary key contain NULL values? No. Here is why primary key and NULL do not mix, and the simple interview question many candidates miss.

Read More
Table type descriptor window.

SQL SERVER – Identify Table Where Clustered Index is Not a Primary Key – DMV

April 26, 2016
Pinal Dave
SQL Performance
SQL Constraint and Keys, SQL Index, SQL Scripts, SQL Server

Let us first see script which will return us tablename with schema where clustered index is not a primary key.

Read More
Loose planks in a staging bin beside planks held in an orderly slotted rack

Interview Question of the Week #062 – How to Find Table Without Clustered Index (Heap)?

March 13, 2016
Pinal Dave
SQL Interview Questions and Answers
Clustered Index, SQL Constraint and Keys, SQL Scripts, SQL Server

Not every table has a clustered index. Here is a quick script to find each table without a clustered index, also called a Heap, in your database.

Read More
Previous 1 … 3 4 5 6 7 8 9 … 24 Next
  • Books
  • Testimonials
  • Privacy Policy

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