On Wed, 2005-03-09 at 21:21 -0500, Tom Lane wrote: 
> Comments?  Can anyone confirm whether DB2 or other databases allow
> ungrouped column references with HAVING?

In Sybase:

    1> select 2 as id, max(myfield) from mytable where 2=1
    2> go
     id
     ----------- ----------
               2 NULL

    (1 row affected)
    1> select 2 as id, max(myfield) from mytable having 2=1
    2> go
     id
     ----------- ----------

    (0 rows affected)

-- 
Mark Shewmaker
[EMAIL PROTECTED]


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to