On Sat, 2007-09-15 at 12:40 +0500, rihad wrote: > How can I efficiently return the minimum/maximum of two given > expressions? Like SELECT MYMIN(a+b-c,d+e*f). >
SELECT LEAST(a+b-c,d+e*f);
SELECT GREATEST(a+b-c,d+e*f);
Regards,
Jeff Davis
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
