Leon
Member since Dec 11, 2008
- Profile: /members/1320-leon.htm
- Comments: 1
Recent Blog Comments By Leon
-
SQL COALESCE() Very Cool, But Slower Than ISNULL()
Posted on Sep 29, 2006 at 2:37 PM
COALESCE is actually very useful in certain situations. For example, if you had a table with two quantity columns and you wanted to sum the difference between them, you would do, select sum(coalesce(quanitty1, 0) - coalesce(quantity2, 0)) as difference If you didn't use coalesce, then the sum wil... read more »