Add a NOT NULL column with a default safely, distinguish metadata changes from row updates, and plan a staged Standard edition rollout.
SQL SERVER – UPDATE From SELECT Statement – Using JOIN in UPDATE Statement – Multiple Tables in Update Statement
A developer wrote a cursor because he did not know how to UPDATE from SELECT. I show how to use JOIN and multiple tables in an UPDATE statement.
SQL SERVER – Disable All the Foreign Key Constraint in Database – Enable All the Foreign Key Constraint in Database
A tester wanted to load bad data, but foreign keys got in the way. Here is how to disable all the foreign key constraints in a database and enable them again.
Reducing the Size of a Reporting Database
Reducing the size of a reporting database starts with compression, archiving, and index review; shrinking files comes last.
Weekday Logic That Works Under Any DATEFIRST Setting
Make weekday logic independent of DATEFIRST with a normalized offset or a known Monday, then test every date in a full year.
UNION vs UNION ALL in SQL Server: What Each One Does
UNION vs UNION ALL comes down to duplicates: UNION removes them and UNION ALL keeps every row. This post tests both on two small store tables. It also covers sorting, a total row at the bottom, mixed operators and data type rules.
SQL SERVER – Return Specific Row to at the Bottom of the Resultset – T-SQL Script – Part 2
Part 2 on how to return a specific row at the bottom of the resultset. Earlier I used CASE in ORDER BY, and this time I show the UNION ALL method.
SQL SERVER – Interview Questions and Answers Sample Chapter Free Download – SQL in Sixty Seconds #050
SQL in Sixty Seconds hits its 50th episode and a full hour of play time. To celebrate, get a free SQL Server Interview Questions and Answers sample chapter.
SQL SERVER – Return Specific Row to at the Bottom of the Resultset – T-SQL Script
How do I return a few chosen rows at the bottom of the entire resultset, in my own order? A T-SQL script on AdventureWorks shows how to do it.
Scale Up or Scale Out: Signs Your Server Needs More Hardware
Decide when to scale up SQL Server by checking sustained CPU demand, memory pressure, storage latency, and whether query tuning comes first.










