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 toast rack on a breakfast table, some slots holding toast and some empty, beside a small jar of marmalade.

How Much Space Does a NULL Take? NULL Storage in Rows

December 23, 2019
Pinal Dave
SQL Tips and Tricks
Compression, SPARSE Columns, SQL Data Storage, SQL NULL, SQL Server

Measure NULL storage in ordinary rows, compare fixed and variable columns, inspect record size, and test sparse and compressed designs.

Read More
A hand watering the one dry pot in a row of geraniums on a porch step, the other pots left alone

Skipping No-Op Updates: Changing Only Rows That Really Differ

December 16, 2019
Pinal Dave
SQL Tips and Tricks
SQL NULL, SQL Scripts, SQL Server, SQL Server 2022, SQL Trigger

Skip no-op updates with NULL-safe EXCEPT or IS DISTINCT FROM, inspect affected counts, and avoid unnecessary rowversion and trigger changes.

Read More
Gouache painting of a tray of cream, sage and slate thread spools with one spool wearing a vermilion ring

Nullable Columns in a Database: List Them and Count NULLs

December 12, 2019
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL NULL, SQL Scripts

Nullable columns in a database cost you ISNULL calls and OR IS NULL conditions in every query. This post lists them with a catalog query, compares the INFORMATION_SCHEMA version, and counts the real NULLs in each column. The count tells you which columns can become NOT NULL and which can go.

Read More
A large open steamer trunk in an attic holding only a few linens, some matching socks and one long red umbrella.

Profiling a Table’s Data: Nulls, Distinct Values and Lengths

July 2, 2019
Pinal Dave
SQL Tips and Tricks
DBA, SQL Column, SQL Datatype, SQL NULL, SQL Server

Start profiling a table’s data with null counts, distinct values, lengths, and generated checks that expose misleading column definitions.

Read More
Title card: System.ArgumentNullException: Value Cannot Be Null

SQL SERVER – Installation Error: System.ArgumentNullException – Value Cannot be Null

May 9, 2019
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL NULL, SQL Server, SQL Server Installation

A client automating SQL Server installs saw random failures: System.ArgumentNullException, Value cannot be null. Here is what Detail.txt showed and the cause.

Read More
Gouache painting of a wooden pigeonhole cabinet filled with blocks except one slot, with a vermilion block waiting beside it

Change Column From NULL to NOT NULL in SQL Server

January 12, 2018
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Datatype, SQL NULL, SQL Scripts

To change a column from NULL to NOT NULL, first fill every NULL value, then run ALTER COLUMN with the full data type and NOT NULL. This post shows the Msg 515 error you get otherwise, how to choose the replacement value, and the trap that makes a column nullable again. It ends with a default constraint that keeps new rows valid.

Read More
A clay blank and two differently shaped molds sit beside a fitted sample.

SQL SERVER – Puzzle – Brain Teaser – Changing Data Type is Changing the Default Value

December 8, 2017
Pinal Dave
SQL Puzzle
SQL Column, SQL Datatype, SQL NULL, SQL Server

Changing the Default Value is the question behind this data-type puzzle. I keep the expression, data type and nullability separate.

Read More
Previous 1 2 3 4 5 6 … 12 Next
  • Books
  • Testimonials
  • Privacy Policy

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