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 - Questions and Answers with Database Administrators

SQL SERVER – Questions and Answers with Database Administrators

May 11, 2009
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Coding Standards, SQL Scripts

While hiring Database Administrators and senior developers for a large project, we discussed many interesting questions. Here are some, with my own views.

Read More
Blue, sage and cream textile panels hang in order above folded cloth and a red spool.

CASE Sort Priority: Put Business Order Before Alphabetical Order

May 10, 2009
Pinal Dave
SQL Tips and Tricks
SQL CASE, SQL NULL, SQL Order By, SQL Server

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.

Read More
A SQL Server query in a window.

SQL SERVER – Find Last Date Time Updated for Any Table

May 9, 2009
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts, SQL Table Operation

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.

Read More
Oak casks in a long cellar row ordered from dark old wood to pale new, a hand resting on one in the middle.

Ordered Columnstore Indexes in SQL Server 2022

May 8, 2009
Pinal Dave
SQL Performance
ColumnStore Index, SQL Index, SQL Server, SQL Server 2022

Build an ordered columnstore index in SQL Server 2022, inspect segment bounds, and compare range-query reads on your own data.

Read More
Gouache painting: two open burlap sacks stand side by side

INTERSECT: Return Shared Values Once

May 7, 2009
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

INTERSECT returns distinct shared rows, including shared NULL. Compare it with an equality join that preserves matching-pair multiplicity.

Read More
Hands trimming a bonsai tree in a red pot

A Weekly Routine for SQL Server Administration

May 6, 2009
Pinal Dave
SQL Tips and Tricks
Best Practices, DBA, SQL Backup and Restore, SQL Monitoring

A weekly routine for SQL Server Administration checks recovery, failures, capacity, integrity, security, and pending changes in a practical order.

Read More
A small rowing skiff and a wide log raft moored side by side at a river jetty, a ferryman watching the bend.

Adaptive Joins: When the Plan Picks Its Join at Run Time

May 5, 2009
Pinal Dave
SQL Performance
Execution Plan, Query Hint, SQL Joins, SQL Performance, SQL Server

Understand adaptive joins in SQL Server, read their runtime threshold, inspect the actual choice, and test a query hint safely.

Read More
Gouache painting: on an identical drum beside it, a cord cut from a rounded-off measure falls a hair short, leaving a tiny visible gap beside a small vermilion knot

PI: Choose the Precision of a Circle Calculation

May 4, 2009
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

PI provides an approximate circle constant. This example keeps radius, circumference and two area calculations together to show when a chosen decimal conversion occurs.

Read More
Column properties window in microsoft sql server management studio.

SQL SERVER – Add or Remove Identity Property on Column

May 3, 2009
Pinal Dave
SQL Tips and Tricks
SQL Identity, SQL Scripts

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.

Read More
Previous 1 … 491 492 493 494 495 496 497 … 590 Next
  • Books
  • Testimonials
  • Privacy Policy

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