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
Gouache painting of a tray of mixed buttons on a sewing table, with a few matching vermilion buttons set apart in a small dish.

REGEXP_COUNT in SQL Server 2025: Counting Pattern Matches in Text

August 25, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

REGEXP_COUNT counts how many times a pattern matches inside a text value, a job that used to need LEN and REPLACE tricks. This post tests it on SQL Server 2025: start position, flags, NULL and empty text, a data quality check, and where the old trick still fits.

Read More
SQL SERVER - DELETE, TRUNCATE and RESEED Identity

SQL SERVER – DELETE, TRUNCATE and RESEED Identity

August 24, 2012
Pinal Dave
SQL Tips and Tricks

How does an identity column behave after DELETE, TRUNCATE and RESEED Identity? A short T-SQL script with seed 11 shows what value comes next in each case.

Read More
SQL SERVER - Reseting Identity Values for All Tables

SQL SERVER – Reseting Identity Values for All Tables

August 23, 2012
Pinal Dave
SQL Tips and Tricks

A DBA deleted all data in a loop and wondered why identity did not restart. Our long chat on resetting identity values for all tables, and why TRUNCATE helps.

Read More
A row of identical hooks on a wall, each carrying a different coloured enamel tag.

SQL SERVER – Color Coding SQL Server Management Studio Status Bar – SQL in Sixty Seconds #023 – Video

August 22, 2012
Pinal Dave
SQL Video
Database, SQL in Sixty Seconds, SQL Scripts, SQL Server, SQL Server Management Studio

Color code the SQL Server Management Studio status bar so you always know which server you are on before you run a script. A quick video.

Read More
Two clean leather shoes beside a dusty shoe being brushed

Non-Updating Updates: Skipping Rows That Would Not Change

August 21, 2012
Pinal Dave
SQL Tips and Tricks
DBA, SQL Scripts, SQL Server

An UPDATE that writes the same value still marks the row as modified. I show how IS DISTINCT FROM skips those rows and keeps NULL changes.

Read More
Two halves of a snap fastener join as one connection despite being presented from opposite sides

Unique Pairs in Either Order: Blocking A-B When B-A Exists

August 20, 2012
Pinal Dave
SQL Tips and Tricks
Computed Column, Duplicate Records, SQL Constraint and Keys, SQL Index

A plain unique index treats (1, 2) and (2, 1) as different rows. Two computed columns and one index fix that, and I test the awkward cases.

Read More
A staple remover exposes different metal staple shapes beside one intact fastening

Is This Instance Patched? Reading ProductUpdateLevel and Build

August 19, 2012
Pinal Dave
SQL Tips and Tricks
Cumulative Update, SQL Instance, SQL Monitoring, SQL Patch

An update label is one clue, the build number is the identity. I show how to read both, compare builds safely, and avoid the NULL typo trap.

Read More
Previous 1 … 520 521 522 523 524 525 526 … 841 Next
  • Books
  • Testimonials
  • Privacy Policy

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