On Tue, Jul 01, 2003 at 12:29:16 -0400,
  Greg Stark <[EMAIL PROTECTED]> wrote:
> 
> SELECT greatest(a,b) FROM bar
> 
> would return one tuple for every record in the table with a single value
> representing the greater of bar.a and bar.b.

You can do this with case.

SELECT CASE WHEN a >= b THEN a ELSE b END FROM bar;

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to