ALTER TABLE … DROP PRIMARY KEY is MySQL syntax and fails in SQL Server with Msg 156. Here is how to drop primary key constraint the SQL Server way.
SQL SERVER – Questions and Answers with Database Administrators
While hiring Database Administrators and senior developers for a large project, we discussed many interesting questions. Here are some, with my own views.
CASE Sort Priority: Put Business Order Before Alphabetical Order
CASE sort priority makes the queue policy explicit. Map known statuses to numeric ranks and keep missing or unfamiliar labels visible. Finish tied ranks with a unique key.
SQL SERVER – Find Last Date Time Updated for Any Table
Want the last date time a table was updated without an UpdatedDate column? The sys.dm_db_index_usage_stats DMV shows it. A quick demo on AdventureWorks.
Ordered Columnstore Indexes in SQL Server 2022
Build an ordered columnstore index in SQL Server 2022, inspect segment bounds, and compare range-query reads on your own data.
INTERSECT: Return Shared Values Once
INTERSECT returns distinct shared rows, including shared NULL. Compare it with an equality join that preserves matching-pair multiplicity.
A Weekly Routine for SQL Server Administration
A weekly routine for SQL Server Administration checks recovery, failures, capacity, integrity, security, and pending changes in a practical order.
Adaptive Joins: When the Plan Picks Its Join at Run Time
Understand adaptive joins in SQL Server, read their runtime threshold, inspect the actual choice, and test a query hint safely.
PI: Choose the Precision of a Circle Calculation
PI provides an approximate circle constant. This example keeps radius, circumference and two area calculations together to show when a chosen decimal conversion occurs.
SQL SERVER – Add or Remove Identity Property on Column
There is no direct T-SQL to add or remove the identity property on an existing column. Imran Mohammed shows how SSMS does it and what happens behind it.










