I have a nullable varchar and even when it is null, I want my select to return an empty string and not null. That is
SELECT FIRST, LAST
FROM CUSTOMER
What I want is if FIRST is null, I want the return to be ""
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can also use
This has the advantage of being more portable (COALESCE is part of the SQL Standard, ISNULL isn’t)
You can also use an arbitrary number of arguments, like
And COALESCE will use the first non-null value encountered