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
Two stacks of chocolate boxes, one short and full, one twice as tall with half-empty boxes

Page Density: The Fragmentation Number That Actually Slows Scans

December 9, 2010
Pinal Dave
SQL Performance
SQL Data Storage, SQL DMV, SQL Index, SQL Server

Measure page density and fragmentation, compare scan reads around a test rebuild, and choose fill factor using workload evidence.

Read More
Gouache painting: in a garden bed, a strawberry mother plant and its two small runner plants, still joined by their green runners, sit together in a shallow wooden crate resting on the soil

hierarchyid IsDescendantOf: A Node Includes Itself

December 7, 2010
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

hierarchyid IsDescendantOf tests membership in a subtree, including its root. These literal paths keep both compared nodes visible and distinguish self from a strict descendant.

Read More
Shiny golden coins and dollar bills.

SQL SERVER – Puzzle – Error While Converting Money to Decimal

December 5, 2010
Pinal Dave
SQL Puzzle
SQL Datatype, SQL Scripts, SQL Server

The answer to my puzzle on Converting Money to DECIMAL(5,2): why it fails with arithmetic overflow, and why DECIMAL(7,2) works, since precision includes scale.

Read More
Gouache painting: two sandwiches sit on matching plates and look identical from the front

CONCAT: Missing Inputs Produce Present Text

December 3, 2010
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server

CONCAT builds display text from available inputs. Preserve missing-source flags when output alone cannot prove completeness.

Read More
Folded deckchairs taken from a tall stack and opened one by one in a long row along the beach.

Unpivoting Columns Into Rows With CROSS APPLY and VALUES

December 2, 2010
Pinal Dave
SQL Tips and Tricks
PIVOT and UNPIVOT, SQL NULL, SQL Scripts, SQL Server

Use CROSS APPLY and VALUES for unpivoting columns, retain nulls deliberately, preserve labels, and turn paired fields into aligned rows.

Read More
Gouache painting: three positions along a tack room wall

geometry STIsEmpty: Empty Shapes Are Different From SQL NULL

November 24, 2010
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STIsEmpty tests whether an existing spatial instance has an empty point set. I keep that condition separate from SQL NULL. A missing database value and a present empty geometry are different inputs.

Read More
Small wooden practice blocks in varied shapes beside an open blank notebook on an oak table.

How to Practise SQL Without a Real Database

November 20, 2010
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

You can practise SQL with small invented tables, generated rows, and repeatable exercises without access to a company's production database.

Read More
Previous 1 … 324 325 326 327 328 329 330 … 416 Next
  • Books
  • Testimonials
  • Privacy Policy

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