Posts tagged IsNull
Problem with ISNULL
03 years ago
in Transact-SQL
While going through “Question of the day” from http://www.sqlservercentral.com/, I discovered an issue with the ISNULL function.
If you were to run the query below, you will be suprised to hear, that the result returned is “A”. I am sure you would expect the result to be [...]
COALESCE – Return first non-NULL value from multiple choices
03 years ago
in Transact-SQL
Whilst studying for my MCITP Database Developer certification, I have come across a very useful function that returns the value of the first non-NULL value from multiple choices:
SELECT LastName, FirstName, COALESCE(MobilePhone, HomePhone) AS Phone
If the MobilePhone field is blank, it will use the [...]