Home > PostgreSQL > NVL() function in Postgre SQL

NVL() function in Postgre SQL

Do Postgre have any function that equals to NVL() of Oracle? of course, it do have the same function but with different name. Below is the systax:

coalesce(expr1, expr2, expr3,....)

this function’ll returns the first non-null expression that is passed to it.

Ex:  
SELECT coalesce(<column name 1>, <New value>), <Column name 2> 
FROM <Table name> 
WHERE <Some Condition>

If <Column name 1> is NULL, it’ll be replaced by <New value>

Advertisements
Categories: PostgreSQL Tags:
  1. Pal Pandi.G
    December 5, 2011 at 7:35 PM

    Thanks a lot

  2. July 18, 2013 at 4:03 PM

    I’m curious to find out what blog system you are using? I’m having some small security issues with my latest site and I’d like to find something more safe. Do you have any recommendations?

  3. July 27, 2013 at 12:16 AM

    Hi there friends, fastidious post and pleasant arguments commented at this place,
    I am actually enjoying by these.

  4. July 27, 2013 at 2:19 AM

    Right away I am going away to do my breakfast, later than having my breakfast
    coming yet again to read more news.

  5. August 8, 2013 at 8:49 AM

    naturally like your web site but you have to take a look at the
    spelling on quite a few of your posts. A number of them are rife with spelling problems and I find it very bothersome to inform the truth on the other
    hand I’ll surely come back again.

  6. August 8, 2013 at 1:15 PM

    What’s up to every single one, it’s really a fastidious for me to
    visit this site, it includes important Information.

  7. June 24, 2014 at 4:41 PM

    What’s up, this weekend is nice in favor of me, for the reason that this point in time i
    am reading this wonderful educational post here at my
    home.

  1. September 8, 2011 at 10:52 AM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: