Nicely done, Dave. Here's another (very) slight difference for those that have to operate on really big data.
--===== Conditionally drop the test table to make reruns easier
IF OBJECT_ID('TempDB..#TestTable','U') IS NOT NULL
DROP TABLE #TestTable;
--===== Build and populate the test tables on the fly
SELECT TOP (1000000)
IDENTITY(INT,1,1) AS SomeInt,
CAST(NULL AS INT) AS SomeNull
INTO #TestTable
FROM Master.sys.AllColumns ac1
CROSS JOIN Master.sys.AllColumns ac2;
--===== Create a variable used to take the display time out of the picture
DECLARE @BitBucket INT;
--===== Tests for performance
PRINT '========== ISNULL on all INTs =====';
SET STATISTICS TIME ON;
SELECT @BitBucket = ISNULL(SomeInt,1)
FROM #TestTable;
SET STATISTICS TIME OFF;
PRINT '========== ISNULL on all NULLs =====';
SET STATISTICS TIME ON;
SELECT @BitBucket = ISNULL(SomeNull,1)
FROM #TestTable;
SET STATISTICS TIME OFF;
PRINT '========== COALESCE on all INTs =====';
SET STATISTICS TIME ON;
SELECT @BitBucket = COALESCE(SomeInt,1)
FROM #TestTable;
SET STATISTICS TIME OFF;
PRINT '========== COALESCE on all NULLs =====';
SET STATISTICS TIME ON;
SELECT @BitBucket = COALESCE(SomeNull,1)
FROM #TestTable;
SET STATISTICS TIME OFF;
On my box, I get the following results...
(1000000 row(s) affected)
========== ISNULL on all INTs =====
SQL Server Execution Times:
CPU time = 594 ms, elapsed time = 603 ms.
========== ISNULL on all NULLs =====
SQL Server Execution Times:
CPU time = 625 ms, elapsed time = 624 ms.
========== COALESCE on all INTs =====
SQL Server Execution Times:
CPU time = 703 ms, elapsed time = 703 ms.
========== COALESCE on all NULLs =====
SQL Server Execution Times:
CPU time = 766 ms, elapsed time = 775 ms.