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 - How to Drop Primary Key Contraint

SQL SERVER – How to Drop Primary Key Constraint

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

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.

Read More
SQL SERVER - 2008 - Find Relationship of Foreign Key and Primary Key using T-SQL - Find Tables With Foreign Key Constraint in Database

SQL SERVER – 2008 – Find Relationship of Foreign Key and Primary Key using T-SQL – Find Tables With Foreign Key Constraint in Database

February 26, 2009
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Scripts

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.

Read More
SQL SERVER - Introduction to Force Index Query Hints - Index Hint - Part2

SQL SERVER – Introduction to Force Index Query Hints – Index Hint – Part2

February 8, 2009
Pinal Dave
SQL Performance
SQL Constraint and Keys, SQL Index, SQL Scripts

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.

Read More
Execution Plan.

SQL SERVER – Introduction to Force Index Query Hints – Index Hint

February 7, 2009
Pinal Dave
SQL Performance
SQL Constraint and Keys, SQL Index, SQL Scripts

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.

Read More
SQL SERVER - Observation - Effect of Clustered Index over Nonclustered Index

SQL SERVER – Observation – Effect of Clustered Index over Nonclustered Index

February 4, 2009
Pinal Dave
SQL Puzzle
SQL Constraint and Keys, SQL Index, SQL Scripts

An observation from my query optimization work: the effect of clustered index on a nonclustered index, shown with a sample table and execution plans.

Read More
SQL Server results window with contact information.

SQL SERVER – Interesting Observation about Order of Resultset without ORDER BY

November 24, 2008
Pinal Dave
SQL Performance
SQL Constraint and Keys, SQL Scripts

Two simple AdventureWorks queries return the same rows in a different order without ORDER BY. I explain why that order is never guaranteed.

Read More
A painting shows a walnut cabinet with nested storage trays and three unlettered wooden keys.

Closure Table: Read and Validate Hierarchy Paths

October 17, 2008
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Index, SQL Joins

A closure table stores ancestor and descendant paths. Read those relationships efficiently and compare them with the authoritative parent edges.

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

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