[Info-ingres] Question on min() and nullability
Martin Bowes
martin.bowes at ndph.ox.ac.uk
Thu Oct 29 13:13:44 UTC 2020
Of course, thanks Karl.
-----Original Message-----
From: Karl Schendel <schendel at kbcomputer.com>
Sent: 29 October 2020 13:11
To: Martin Bowes <martin.bowes at ndph.ox.ac.uk>
Cc: info-ingres at lists.planetingres.org
Subject: Re: [Info-ingres] Question on min() and nullability
> On Oct 29, 2020, at 9:08 AM, Martin Bowes <martin.bowes at ndph.ox.ac.uk> wrote:
>
> select ii_dv_desc(min(a)) from session.test Executing . . .
>
>
> ┌──────────────────────────────────────────────────────────────┐
> │col1 │
> ├──────────────────────────────────────────────────────────────┤
> │nullable ingresdate │
> └──────────────────────────────────────────────────────────────┘
> (1 row)
>
> How can the min of a non nullable field ever itself be a null?
>
Because it's an aggregate. min can be null if there are no rows.
Karl
_______________________________________________
Info-ingres mailing list
Info-ingres at lists.planetingres.org
https://lists.planetingres.org/mailman/listinfo/info-ingres
More information about the Info-ingres
mailing list