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.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png