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
A kitchen pass with a single order pad and a full tray of dishes waiting beside it

What Is a Stored Procedure in SQL Server?

June 14, 2013
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

A stored procedure is SQL with a name, a door and a contract. Why granting EXECUTE beats granting table access, what parameters buy you, and the plan reuse story people get half right.

Read More
A pair of brass scales on a counter with a coin resting in each pan, perfectly level

What Is a Transaction in SQL Server?

June 12, 2013
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

A transaction in SQL Server is a group of changes that all happen or none do. A rollback that undid 16,440 rows, what ACID means in four short words, and the open transaction that quietly fills a drive.

Read More
A glass vase of beans in colored layers, a scoop from the top holding only red beans.

TABLESAMPLE Samples Pages, Not Rows: Sampling a Large Table Right

June 1, 2013
Pinal Dave
SQL Tips and Tricks
SQL Random, SQL Scripts, SQL Server

Compare TABLESAMPLE page sampling with NEWID sorting and CHECKSUM filters by row count, reads, spread, and repeatability.

Read More
Gouache painting of an empty bowl and a stone-filled bowl on a balance, above matching empty and occupied wooden recesses.

ANSI_NULLS Puzzle and NULL in SQL Server: SQL in Sixty Seconds #052

May 29, 2013
Pinal Dave
SQL Video
SQL Deprecated Feature, SQL in Sixty Seconds, SQL NULL, SQL Scripts

This ANSI_NULLS puzzle starts with two queries that look alike, and only one returns a row. The tests here explain the NULL logic behind IN and NOT IN, show what SET ANSI_NULLS OFF still does on SQL Server 2025, and give a safer pattern for real queries.

Read More
Empty result in query.

SQL SERVER- Solution – SQL Puzzle of SET ANSI_NULL

May 28, 2013
Pinal Dave
SQL Puzzle
SQL Scripts

The solution to my Puzzle of SET ANSI_NULL: why IN returns a row but NOT IN returns nothing when the list has a NULL, and how SET ANSI_NULLS ON explains it.

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
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
Previous 1 … 186 187 188 189 190 191 192 … 363 Next
  • Books
  • Testimonials
  • Privacy Policy

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