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
Several mortar and pestle sets divide one herb batch beside a crowded single mortar

Page View Counters: Avoiding Hot Row Contention on Busy Rows

May 16, 2013
Pinal Dave
SQL Tips and Tricks
SQL Counter, SQL Lock, SQL Server

One counter row means every visitor waits in line. See how buckets spread the locks, and why rows on one page can still crowd each other.

Read More
A shuttlecock resting exactly on a court's boundary line, two rackets lying still on either side of the net.

Three-Valued Logic: TRUE, FALSE and UNKNOWN in a WHERE Clause

May 15, 2013
Pinal Dave
SQL Tips and Tricks
SQL NULL, SQL Operator, SQL Server, SQL Server 2022, SQL Sub Query

Understand three-valued logic in WHERE and CHECK, avoid NULL-poisoned NOT IN, and use SQL Server 2022 null-safe comparisons.

Read More
SQL SERVER - How to use xp_sscanf in Real World Scenario?

SQL SERVER – How to use xp_sscanf in Real World Scenario?

May 14, 2013
Pinal Dave
SQL Puzzle
SQL Scripts

I came across the extended stored procedure xp_sscanf and could not find a real world use for it. Here is how it works. Can you tell me where to use it?

Read More
SQL Server query result window.

SQL SERVER – Puzzle and Answer – REPLICATE over 8000 Characters

May 13, 2013
Pinal Dave
SQL Puzzle
SQL Function

A quick Monday puzzle: what happens when you REPLICATE over 8000 characters into a VARCHAR(MAX) variable? Guess the lengths before you run it.

Read More
Gouache painting of a harbor anchor chain broken in two by a missing link, with the lone link painted red

CONCAT_NULL_YIELDS_NULL and CONCAT: How NULL Behaves in Strings

May 12, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL NULL, SQL Scripts, SQL Server

The CONCAT_NULL_YIELDS_NULL setting decides whether a string plus NULL returns NULL. The CONCAT function never looks at it and treats NULL as an empty string. This post tests both on a customer table, shows the errors the OFF setting causes, and gives safe patterns for names and numbers.

Read More
A checkout belt with three groups of groceries split by red divider bars

GO Is Not T-SQL: Batches, Variable Scope and GO With a Count

May 11, 2013
Pinal Dave
SQL Tips and Tricks
Batch, SQL Scripts, SQL Server, sqlcmd

Learn why GO is not T-SQL, how batches reset variable scope, what GO 3 repeats, and how applications should send scripts safely.

Read More
SQL SERVER - Adding Column Defaulting to Current Datetime in Table

SQL SERVER – Adding Column Defaulting to Current Datetime in Table

May 10, 2013
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts, SQL Server

How do you add a column that fills in the current datetime when a row is inserted? A sample table and a column with a default value that does it for you.

Read More
Previous 1 … 485 486 487 488 489 490 491 … 844 Next
  • Books
  • Testimonials
  • Privacy Policy

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