Get the max(value1, value2, value3) from a table

Поиск
Список
Период
Сортировка
От Emi Lu
Тема Get the max(value1, value2, value3) from a table
Дата
Msg-id 4782A1B2.5050804@encs.concordia.ca
обсуждение исходный текст
Ответы 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  (Josh Williams <joshwilliams@ij.net>)
Список pgsql-sql
Greetings,

Version: PostgreSQL 8.0.13 on i686-pc-linux-gnu

I have a table test(col1, col2, col3)

For each row, I'd like to get the "max"(col1, col2, col3).

For example, test(1, 5, 2)             test(8, 1, 3)             test(12, 1, 1)


select ?max?(col1, col2, col3) as result;
will return

result
-------
5
8
12

(3 rows)

Thanks!
Ly.


В списке pgsql-sql по дате отправления:

Предыдущее
От: gherzig@fmed.uba.ar
Дата:
Сообщение: Re: reading WAL files in python
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Get the max(value1, value2, value3) from a table