select 1 from tab having 1=1;
returns 2 rows
I'm curious whats in those two rows... {{1} {1}} ?
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
On Thu, 10 Mar 2005 12:44:50 -0500, Tom Lane <[EMAIL PROTECTED]> wrote:
> Would those of you with access to other DBMSes try this:
>
On informix 9.21.UC4
> create table tab (col integer);
> select 1 from tab having 1=0;
>
returns no rows
> select 1 from tab having 1=1;
>
returns no rows
> inser
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
I wrote in reference to bug#1528:
> What the spec actually says, or at least implies, is that a HAVING
> clause is to be evaluated only once per group --- where the "group"
> is the whole table if there's no GROUP BY clause.
In fact, reading the spec more closely, it is clear that the presence
of