SQL Interview: 21: Using ISNULL vs COALESCE
This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.
Section: Development Level: Medium
Question:
When writing T-SQL code, you often need to replace NULL values. The core two functions provided are ISNULL and COALESCE.
What is the difference between them?
Answer:
ISNULL only takes a single value to check and replaces it when NULL.
2025-02-15