SQL SERVER – Installation Fails With Error – A Constraint Violation Occurred

In my recent past, I have helped around 10 customers who have had similar problems while installing SQL Server Cluster on windows. So I thought it would be a nice idea to pen it down as a blog post so that it can help others in future. In this blog post we will discuss about Installation Fails With Error – A Constraint Violation Occurred.

Read More

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

Question: When we drop primary key on the column, does it automatically drop a clustered index on the same column (if created)?

Answer: This is one of the most popular questions, whenever I ask this to any candidate, they usually give an answer in yes or no. However, if I ask them follow up question to confirm, I have noticed most of the time they change the reply or accept that they really do not know the answer. It is totally fine. As when I was beginning with SQL, I even did not know the answer of it. I learn doing various experiments and doing various interviews.

Read More

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

This is a very interesting question. I really do not know why interviews are fascinated with this question. One of the professional services I offer is to help organizations select an ideal employee for their organization and last week, I was on a conference call with a large MNC who was looking for performance tuning expert for their organization. We interviewed around 50 different employees and offered jobs to 2 experts and 1 has so far accepted it. One of the questions which I see my friends from the interview panel asking again and again was about Primary Key. I noticed that most of the candidate got it correct.

Read More

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

I am an independent database consultant and I focus on SQL Server Performance Tuning. The other day when I was working with my customer on a large project on performance tuning, we noticed a table which had created performance issues and it contains a huge amount of NULL data. In this blog post we will learn about NOT NULL constraint.

Read More

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

There are moments and time when interviewer sometimes gets highly disappointed. Well, I had such a moment a few days ago. Before you look at the answer – please try to answer this SQL SERVER question yourself first. If your answer is incorrect.

Question: Can Primary Key on the any table contain NULL values? Why?

Read More
Menu