• Re: [Info-ingres] Question on min() and nullability

    From Karl Schendel@schendel@kbcomputer.com to Martin Bowes on Thu Oct 29 09:10:35 2020
    From Newsgroup: comp.databases.ingres



    On Oct 29, 2020, at 9:08 AM, Martin Bowes <martin.bowes@ndph.ox.ac.uk> wrote:

    select ii_dv_desc(min(a)) from session.test
    Executing . . .


    roiroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroE
    roecol1 roe roLroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCron
    roenullable ingresdate roe rooroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroy
    (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

    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Martin Bowes@martin.bowes@ndph.ox.ac.uk to Karl Schendel on Thu Oct 29 13:13:44 2020
    From Newsgroup: comp.databases.ingres

    Of course, thanks Karl.

    -----Original Message-----
    From: Karl Schendel <schendel@kbcomputer.com>
    Sent: 29 October 2020 13:11
    To: Martin Bowes <martin.bowes@ndph.ox.ac.uk>
    Cc: info-ingres@lists.planetingres.org
    Subject: Re: [Info-ingres] Question on min() and nullability



    On Oct 29, 2020, at 9:08 AM, Martin Bowes <martin.bowes@ndph.ox.ac.uk> wrote:

    select ii_dv_desc(min(a)) from session.test Executing . . .


    roiroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroE
    roecol1 roe roLroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCron
    roenullable ingresdate roe rooroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroCroy
    (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@lists.planetingres.org https://lists.planetingres.org/mailman/listinfo/info-ingres
    --- Synchronet 3.21b-Linux NewsLink 1.2