The dashboard says the average is 1 when everyone can see it is 1.5. Here is why AVG does that and the one-line fix.
Drop Multiple Columns in One ALTER TABLE Statement
To drop multiple columns, list them after one DROP COLUMN in one ALTER TABLE statement. This post tests the syntax on a table with a default, a check constraint and an index, shows the error that a dependent object causes and drops the constraints and columns together. It also explains why the disk space doesn’t return until a rebuild.
Idle CPU Condition in SQL Server Agent: How It Works
The idle CPU condition tells SQL Server Agent when the CPUs are quiet enough to start a job. This post shows where to set it, how the two numbers work and how to create the schedule. It also reads the CPU history of your server in T-SQL, so you can choose values that the server can actually meet.
ROWCOUNT_BIG and @@ROWCOUNT: Checking What a Statement Changed
Capture ROWCOUNT_BIG immediately after a change, validate expected counts, and handle NOCOUNT, triggers, and MERGE without stale values.
Get Partition Info in SQL Server: Rows and Boundaries
To get partition info in SQL Server, join sys.partitions to the partition scheme, function and filegroup views. This post builds a small partitioned table, lists every partition with its boundaries, row count and filegroup, and shows how to find the partition for a value. It also lists the tables that have more than one partition.







