Junior Functions SQL & Databases

Difference between ISNULL and COALESCE in SQL Server?

Short answer: ISNULL(a,b) is T-SQL specific, two arguments, return type biased to first argument. COALESCE is ANSI, many arguments, type precedence rules. Prefer COALESCE for portability; know ISNULL for legacy code.

Interview gotcha: ISNULL truncates based on first argument’s type length.
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details