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 – 2008 – Find Relationship of Foreign Key and Primary Key using T-SQL – Find Tables With Foreign Key Constraint in Database
A T-SQL script that finds every table with a foreign key constraint and shows how each foreign key relates to its primary key, now with schema names.
SQL SERVER – Introduction to Force Index Query Hints – Index Hint – Part2
Part 2 on force index query hints: instead of the inline WITH table hint, use the OPTION clause at the end of the query and name the table for each hint.
SQL SERVER – Introduction to Force Index Query Hints – Index Hint
An index hint lets you force SQL Server to use a specific index in a query. I show the WITH (INDEX()) syntax with examples, and why it is for special cases only.
SQL SERVER – Observation – Effect of Clustered Index over Nonclustered Index
An observation from my query optimization work: the effect of clustered index on a nonclustered index, shown with a sample table and execution plans.
SQL SERVER – Interesting Observation about Order of Resultset without ORDER BY
Two simple AdventureWorks queries return the same rows in a different order without ORDER BY. I explain why that order is never guaranteed.
Closure Table: Read and Validate Hierarchy Paths
A closure table stores ancestor and descendant paths. Read those relationships efficiently and compare them with the authoritative parent edges.






