Re: Get the max(value1, value2, value3) from a table - Mailing list pgsql-sql

From Richard Broersma Jr
Subject Re: Get the max(value1, value2, value3) from a table
Date
Msg-id 239138.99803.qm@web31804.mail.mud.yahoo.com
Whole thread Raw
In response to Re: Get the max(value1, value2, value3) from a table  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Responses Re: Get the max(value1, value2, value3) from a table  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Re: Get the max(value1, value2, value3) from a table  (Emi Lu <emilu@encs.concordia.ca>)
List pgsql-sql
--- On Mon, 1/7/08, Scott Marlowe <scott.marlowe@gmail.com> wrote:

> select max(col1) from table
> union all
> select max(col2) from table
> union all
> select max(col3) from table

Would the following work also?

SELECT MAX( GREATEST( col1, col2, col3 ) ) FROM TABLE;

Regards,
Richard Broersma Jr.


pgsql-sql by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Get the max(value1, value2, value3) from a table
Next
From: "Scott Marlowe"
Date:
Subject: Re: Get the max(value1, value2, value3) from a table