Follow us: Connect on YouTube Connect on YouTube Connect on YouTube


Friday, 1 April 2016


This will gives the first non-null string.

    Syntax: coalesce (strng1, string2, string3 … stringn)      

         SQL> select coalesce('a','b','c'), coalesce(null,'a',null,'b') from dual;

-----------   -----------
       a                  a

You May Like                                             
                            SQL Abs
                            SQL Sign
                            SQL Sqrt
                            SQL Mod
                            SQL NVL
                            SQL NVL2
                            SQL Power
                            SQL Exp
                            SQL Ln
                            SQL Log
                            SQL CEIL
                            SQL Floor
                            SQL Round
                            SQL Trunc
                            SQL Bitand
                            SQL Greatest
                            SQL Least
Share this article :


  1. Hi There,

    Great info! I recently came across your blog and have been reading along.
    I thought I would leave my first comment. I don’t know what to say except that I have

    We have a linked server "LinkSQL" defined on SQLServerA against the same server, ie, SQLServerA and the server has Named Pipes disabled. Isn't communication among'st applications within one server happens primarily through Named Pipes. If so, would it be better if we have Named Pipes enabled on this SQLServer box?
    We are seeing intermittent TCP/Semaphore errors and I was wondering if enabling this option would help.
    But nice Article Mate! Great Information! Keep up the good work!

    Thank you,