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
Uneven herb bundles on a brass balance beside a compartment tray of separate portions.

Stored Totals: Find Drift Before Repairing It

October 22, 2010
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Scripts, SQL Server

Stored totals can drift from their authoritative line amounts. This private demonstration finds two mismatches, retains empty orders and accepts valid credits. It checks decimal range before a private repair and explains why concurrency needs separate proof.

Read More
Three small bouquets sharing the same flowers in different mixes, a red poppy in two of them

Tagging With a Many-to-Many Table: Storing and Querying Hashtags

September 4, 2010
Pinal Dave
SQL Tips and Tricks
Database, Normalization, SQL Constraint and Keys, SQL Joins

Store hashtags in a tag and bridge table, normalize input, query any or all requested tags, and count weekly trends without scans.

Read More
Gouache painting of a stone staircase descending into a sunken orchard corner with the first step painted red

Negative Identity Seed and Negative Increment in SQL Server

August 19, 2010
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Identity, SQL Scripts

A Negative Identity seed lets a column start below zero, and a negative increment makes it count down. This post tests IDENTITY(-1,-1) and IDENTITY(-2147483648,1) on SQL Server 2025, shows gaps after a rollback, DBCC CHECKIDENT, and what to do when an int identity runs out. It also shows SEQUENCE as the flexible alternative.

Read More
A wooden mannequin in a red helmet slides safely down a railed slide while another gives a thumbs up

Stop Blaming the User: Let Constraints Catch Bad Data

July 23, 2010
Pinal Dave
SQL Tips and Tricks
Best Practices, Developer, SQL Constraint and Keys, SQL Humor

Blaming the user is the oldest joke in IT. Here’s why it fails, and how NOT NULL, CHECK, UNIQUE and foreign keys stop bad data before it lands.

Read More
Three wooden gauges with finite end stops and fitted measuring bars in a sunlit workshop.

Unsigned Integers: Safe Type and Range Mapping

July 12, 2010
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Datatype, SQL Migration, SQL Server

Map unsigned integers to SQL Server types without narrowing their range. Keep strict source-text validation separate from destination CHECK constraints.

Read More
A wooden mannequin hunts under sofa cushions while a small mannequin outside holds up the red car keys

SQL Error Riddles: Parent Keys Not Found and Other Classics

May 29, 2010
Pinal Dave
SQL Tips and Tricks
Primary Key, SQL Constraint and Keys, SQL Error Messages, SQL Humor

SQL error riddles have been passed around for years. Here are the classics, told kindly, with the real SQL Server error behind each punchline.

Read More
A hand searching a tin of jumbled buttons for a matching set, an empty compartment tray beside it.

Indexing Foreign Keys

May 19, 2010
Pinal Dave
SQL Performance
SQL Constraint and Keys, SQL Index, SQL Lock, SQL Server

Indexing foreign keys can speed joins and parent deletes when child-side indexes are missing; learn how to find gaps and test write tradeoffs.

Read More
Previous 1 … 12 13 14 15 16 17 18 … 25 Next
  • Books
  • Testimonials
  • Privacy Policy

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