From: Feixiong Li <feixiongli@gmail.com>
To: pgsql-sql@postgresql.org
Subject: How to max() make null as biggest value?
Date: Wed, 14 Apr 2010 12:33:30 +0800
Message-ID: <2A8BBCA2-814C-4E8D-BCE1-11FA2F8D120E@gmail.com> (raw)
Hi , guys ,
I am newbie for sql, I have a problem when using max() function, I
need get null when there are null in the value list, or return the
largest value as usual, who can do this?
i.e. max([1,2,3,4,5]) => 5
max([1,2,3,4,5,null]) => null
thanks in advance!
Feixiong
feixiongli@gmail.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: feixiongli@gmail.com
Subject: Re: How to max() make null as biggest value?
In-Reply-To: <2A8BBCA2-814C-4E8D-BCE1-11FA2F8D120E@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox